[GH-ISSUE #280] worksheet_set_row_opt (constant_memory) shows inverted expander #224

Closed
opened 2026-05-05 11:59:00 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @znakeeye on GitHub (Apr 1, 2020).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/280

Originally assigned to: @jmcnamara on GitHub.

I see a glitch when setting the outline on each row, in sequence. E.g.:

lxw_row_col_options options = { .hidden = 0, .level = 1, .collapsed = 0 };
worksheet_set_row_opt(ws, currentRow++, LXW_DEF_ROW_HEIGHT, NULL, &options);

Actual:
outline_actual

Expected:
outline_expected

Why is it inverted like that?

Originally created by @znakeeye on GitHub (Apr 1, 2020). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/280 Originally assigned to: @jmcnamara on GitHub. I see a glitch when setting the outline on each row, in sequence. E.g.: ```c lxw_row_col_options options = { .hidden = 0, .level = 1, .collapsed = 0 }; worksheet_set_row_opt(ws, currentRow++, LXW_DEF_ROW_HEIGHT, NULL, &options); ``` **Actual:** ![outline_actual](https://user-images.githubusercontent.com/958469/78136217-8870e980-7423-11ea-9113-d64977efaec0.png) **Expected:** ![outline_expected](https://user-images.githubusercontent.com/958469/78136207-83ac3580-7423-11ea-83b9-368b80799b48.png) Why is it inverted like that?
gitea-mirror 2026-05-05 11:59:00 -06:00
Author
Owner

@jmcnamara commented on GitHub (Apr 1, 2020):

For clarity, can you add a small complete compilable C program that demonstrates the issue.

<!-- gh-comment-id:607243903 --> @jmcnamara commented on GitHub (Apr 1, 2020): For clarity, can you add a small complete compilable C program that demonstrates the issue.
Author
Owner

@znakeeye commented on GitHub (Apr 1, 2020):

lxw_workbook_options wo { 1, NULL, 0 };
auto wb = workbook_new_opt("foo.xlsx", &wo);
auto ws = workbook_add_worksheet(wb, "Sheet1");

int row = 0;

lxw_row_col_options co = { 0, 1, 0 };
worksheet_set_row_opt(ws, row++, LXW_DEF_ROW_HEIGHT, NULL, &co);
worksheet_set_row_opt(ws, row++, LXW_DEF_ROW_HEIGHT, NULL, &co);
worksheet_set_row_opt(ws, row++, LXW_DEF_ROW_HEIGHT, NULL, &co);

workbook_close(wb);
<!-- gh-comment-id:607249030 --> @znakeeye commented on GitHub (Apr 1, 2020): ```c++ lxw_workbook_options wo { 1, NULL, 0 }; auto wb = workbook_new_opt("foo.xlsx", &wo); auto ws = workbook_add_worksheet(wb, "Sheet1"); int row = 0; lxw_row_col_options co = { 0, 1, 0 }; worksheet_set_row_opt(ws, row++, LXW_DEF_ROW_HEIGHT, NULL, &co); worksheet_set_row_opt(ws, row++, LXW_DEF_ROW_HEIGHT, NULL, &co); worksheet_set_row_opt(ws, row++, LXW_DEF_ROW_HEIGHT, NULL, &co); workbook_close(wb); ```
Author
Owner

@jmcnamara commented on GitHub (Apr 1, 2020):

That isn't a complete compilable C program.

P.S. I just checked and the "Actual" is the Excel default.

You can get the "Expected" by changing the Excel worksheet settings via worksheet_outline_settings(): https://libxlsxwriter.github.io/worksheet_8h.html#a9efae5027e762c9a29f6afa547e4b2db

In particular the symbols_below option.

<!-- gh-comment-id:607250379 --> @jmcnamara commented on GitHub (Apr 1, 2020): That isn't a complete compilable C program. P.S. I just checked and the "Actual" is the Excel default. You can get the "Expected" by changing the Excel worksheet settings via `worksheet_outline_settings()`: https://libxlsxwriter.github.io/worksheet_8h.html#a9efae5027e762c9a29f6afa547e4b2db In particular the `symbols_below` option.
Author
Owner

@znakeeye commented on GitHub (Apr 1, 2020):

Ah! Thanks a lot!

PS. Will improve my samples from now on :)

<!-- gh-comment-id:607251938 --> @znakeeye commented on GitHub (Apr 1, 2020): Ah! Thanks a lot! PS. Will improve my samples from now on :)
Author
Owner

@jmcnamara commented on GitHub (Apr 1, 2020):

No problem. Thanks for following up.

<!-- gh-comment-id:607257241 --> @jmcnamara commented on GitHub (Apr 1, 2020): No problem. Thanks for following up.
Author
Owner

@znakeeye commented on GitHub (Apr 1, 2020):

By the way, your API design is absolutely brilliant. Keep up the good work!

<!-- gh-comment-id:607258497 --> @znakeeye commented on GitHub (Apr 1, 2020): By the way, your API design is absolutely brilliant. Keep up the good work!
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#224
No description provided.