[GH-ISSUE #240] move / reorder worksheets #191

Closed
opened 2026-05-05 11:52:06 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @liquidaty on GitHub (Jul 31, 2019).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/240

Originally assigned to: @jmcnamara on GitHub.

Hello,

If I do:

lxw_worksheet *ws_C = workbook_add_worksheet(wb, "Sheet C");
lxw_worksheet *ws_B = workbook_add_worksheet(wb, "Sheet B");
lxw_worksheet *ws_A = workbook_add_worksheet(wb, "Sheet A");

then is there any way later to re-order the worksheets, before closing the workbook, so that the worksheets are saved in a different order than they were created in (e.g. Sheet A, then Sheet B, then Sheet C)?

Originally created by @liquidaty on GitHub (Jul 31, 2019). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/240 Originally assigned to: @jmcnamara on GitHub. Hello, If I do: ``` lxw_worksheet *ws_C = workbook_add_worksheet(wb, "Sheet C"); lxw_worksheet *ws_B = workbook_add_worksheet(wb, "Sheet B"); lxw_worksheet *ws_A = workbook_add_worksheet(wb, "Sheet A"); ``` then is there any way later to re-order the worksheets, before closing the workbook, so that the worksheets are saved in a different order than they were created in (e.g. Sheet A, then Sheet B, then Sheet C)?
gitea-mirror 2026-05-05 11:52:06 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@jmcnamara commented on GitHub (Aug 1, 2019):

is there any way later to re-order the worksheets, before closing the workbook

No. This was never part of the design. It isn't even supported in the Python or Perl versions.

While it is theoretically possible there are some potential edge cases where it isn't desirable to have the worksheets change order internally. So this is unlikely to be implemented. Sorry.

<!-- gh-comment-id:517310464 --> @jmcnamara commented on GitHub (Aug 1, 2019): > is there any way later to re-order the worksheets, before closing the workbook No. This was never part of the design. It isn't even supported in the Python or Perl versions. While it is theoretically possible there are some potential edge cases where it isn't desirable to have the worksheets change order internally. So this is unlikely to be implemented. Sorry.
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#191
No description provided.