I've figured it out that theme should be false, i.e., .. Style FontStyle; FontStyle.font.color = "FFFF0000"; FontStyle.font.attributes = FONT_BOLD; FontStyle.font.theme = false; .. const size_t FontStyleCode = book.AddStyle(FontStyle); .. The outputted text font color ("some text") will follow font.color. George
Hello, I'm having trouble to specify a text's font color. Here is the code: ... Style FontStyle; FontStyle.font.color = "FFFF0000"; FontStyle.font.attributes = FONT_BOLD; .. const size_t FontStyleCode = book.AddStyle(FontStyle); .. Sheet.BeginRow().AddCell("some text", FontStyleCode).AddCell(..).EndRow(); .. The outputted Excel (.xlsx) has "some text" in bold and black (default). How do I change the text's color to whatever I want? Thanks. George