[GH-ISSUE #10] Issue with formatting #7

Closed
opened 2026-05-05 11:23:46 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @ricardas on GitHub (Oct 7, 2015).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/10

This is snippet from my code:

lxw_format *format = workbook_add_format(workbook);

format_set_font_color(format, 0xff0000); // set red color
worksheet_write_string(worksheet, 0, 0, "Red", format); // write to cell
format_set_font_color(format, 0x00ff00); // set green color
worksheet_write_string(worksheet, 0, 1, "Green", format); // write to another cell

why both cells have green font color?

Originally created by @ricardas on GitHub (Oct 7, 2015). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/10 This is snippet from my code: lxw_format *format = workbook_add_format(workbook); format_set_font_color(format, 0xff0000); // set red color worksheet_write_string(worksheet, 0, 0, "Red", format); // write to cell format_set_font_color(format, 0x00ff00); // set green color worksheet_write_string(worksheet, 0, 1, "Green", format); // write to another cell why both cells have green font color?
Author
Owner

@jmcnamara commented on GitHub (Oct 7, 2015):

That is the documented behavior. See the Workong with Formats section of the docs.

<!-- gh-comment-id:146244577 --> @jmcnamara commented on GitHub (Oct 7, 2015): That is the documented behavior. See the [Workong with Formats](http://libxlsxwriter.github.io/working_with_formats.html) section of the docs.
Author
Owner

@ricardas commented on GitHub (Oct 7, 2015):

Oh, i didn't notice that. All is clear now, thanks.

<!-- gh-comment-id:146245178 --> @ricardas commented on GitHub (Oct 7, 2015): Oh, i didn't notice that. All is clear now, thanks.
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#7
No description provided.