[GH-ISSUE #184] Question: set page number #149

Closed
opened 2026-05-05 11:47:19 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @petricf on GitHub (May 30, 2018).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/184

Originally assigned to: @jmcnamara on GitHub.

I have multiple sheets in a workbook. The first sheet is a intro sheet. From second sheet onwards i set a footer displaying the page number.
I want the second sheet start its page numbering again at 1 when printing.

Can this be done using libxlsxwriter ?

Originally created by @petricf on GitHub (May 30, 2018). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/184 Originally assigned to: @jmcnamara on GitHub. I have multiple sheets in a workbook. The first sheet is a intro sheet. From second sheet onwards i set a footer displaying the page number. I want the second sheet start its page numbering again at 1 when printing. Can this be done using libxlsxwriter ?
gitea-mirror 2026-05-05 11:47:19 -06:00
Author
Owner

@jmcnamara commented on GitHub (May 30, 2018):

Is that possible in Excel? If so how do you do it?

<!-- gh-comment-id:393070272 --> @jmcnamara commented on GitHub (May 30, 2018): Is that possible in Excel? If so how do you do it?
Author
Owner

@petricf commented on GitHub (May 30, 2018):

In LibreOffice 6.x: Menu Format -> Page, Tab Table, Item "First pagenumber" (translated from german)
Excel (> 2010): See guide at this location
Excel 2010: See guide at this location

<!-- gh-comment-id:393113839 --> @petricf commented on GitHub (May 30, 2018): In LibreOffice 6.x: Menu Format -> Page, Tab Table, Item "First pagenumber" (translated from german) Excel (> 2010): See guide at [this location](https://www.extendoffice.com/documents/excel/2338-excel-restart-page-numbering.html) Excel 2010: See guide at [this location](http://blogmines.com/blog/how-to-change-starting-page-number-in-excel-2010/)
Author
Owner

@jmcnamara commented on GitHub (May 30, 2018):

That parameter can be set in libxlsxwriter using the worksheet_set_start_page() function.

However, I don't think that does what you expect it to do. It just sets the first page that will be printed.

<!-- gh-comment-id:393118955 --> @jmcnamara commented on GitHub (May 30, 2018): That parameter can be set in libxlsxwriter using the [worksheet_set_start_page()](https://libxlsxwriter.github.io/worksheet_8h.html#a817235e5ce7b1ea030bedd86ddbb9844) function. However, I don't think that does what you expect it to do. It just sets the first page that will be printed.
Author
Owner

@jmcnamara commented on GitHub (Jun 1, 2018):

Any update on this?

<!-- gh-comment-id:393821315 --> @jmcnamara commented on GitHub (Jun 1, 2018): Any update on this?
Author
Owner

@petricf commented on GitHub (Jun 1, 2018):

Actually tested it. worksheet_set_start_page indeed sets the starting page number used when the page numbers are assigned during printing process.
The current doc of this function seems misleading. I got the impression this function for example skips the first two pages when set to 3.
But the fact is (under LibreOffice) it prints still all pages.
My suggestion is to update the doc to clarify this.

For me this question is hereby solved.

<!-- gh-comment-id:393833983 --> @petricf commented on GitHub (Jun 1, 2018): Actually tested it. worksheet_set_start_page indeed sets the starting page number used when the page numbers are assigned during printing process. The current doc of this function seems misleading. I got the impression this function for example skips the first two pages when set to 3. But the fact is (under LibreOffice) it prints still all pages. My suggestion is to update the doc to clarify this. For me this question is hereby solved.
Author
Owner

@liufeijin commented on GitHub (Oct 4, 2018):

2010 excel
in each sheet we can set the any start number by "Click Page Layout > Page Setup", the start number for each sheet is independent, we can select a sheet and set the any start number.
But the total pages in footer is counting for whole workbook.

<!-- gh-comment-id:426876521 --> @liufeijin commented on GitHub (Oct 4, 2018): >2010 excel in each sheet we can set the any start number by "Click Page Layout > Page Setup", the start number for each sheet is independent, we can select a sheet and set the any start number. But the total pages in footer is counting for whole workbook.
Author
Owner

@jmcnamara commented on GitHub (Oct 4, 2018):

@liufeijin this feature request is ready to be closed. If you have an additional feature request then please start a new issue.

<!-- gh-comment-id:426908792 --> @jmcnamara commented on GitHub (Oct 4, 2018): @liufeijin this feature request is ready to be closed. If you have an additional feature request then please start a new issue.
Author
Owner

@jmcnamara commented on GitHub (Jul 11, 2021):

I've made the docs (hopefully) a bit clearer for this function. Closing.

<!-- gh-comment-id:877800840 --> @jmcnamara commented on GitHub (Jul 11, 2021): I've made the docs (hopefully) a bit clearer for this function. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#149
No description provided.