Free Support Forum -

How to set custom colors to cell in Excel spreadsheet in .NET

I've got the following problem:

Dealin' with Excel Application object I can set

cell's interior color via colorindex like this


And in Aspose.Excel I've got a style object,

but settin' up ForegroundColor property does not help-



But I get black ForegroundColor almost all times and only few members of color work!!Angry [:@]

Do u have any solution?Sad [:(]

Please check Color and Palette for reference.

If the color is not in the standard palette, please change the palette first. And you can use Excel.IsColorInPalette method to check if a color is in standard palette.

Thanks a lot, Laurence - it really works!!