From The Document Foundation Wiki
    < Faq‎ | Calc

    How to insert a page number in the style Page 1 of N onto each page of a spreadsheet

    Page numbers can be inserted into either the header or the footer of a page in a spreadsheet. They will be visible at printing or when viewed in Page Preview.

    However the numbering will not be visible on the spreadsheet itself.

    To insert a page number, follow these instructions:

    1. Go to Insert ▸ Headers and footers.
    2. Select the Header or the Footer tab.
    3. Click on the area where you want the number to appear (Left, Centre, Right).
    4. Type the text Page.
    5. The field codes are represented by icons. Click on the icon that contains only ONE sign [#] to insert the page number field.
    6. Type the text of.
    7. Click on the icon with TWO signs [##] to insert the total number of pages.
    8. Click OK.

    Note: the icons displayed here are the only field instructions which are valid for spreadsheets.