Setting background color

How to set styles to include backgound color on a Cell or Row" for Aspose.Cells?
I can set font but have not been succesful setting the background color.


This message was posted using Email2Forum by Merit.

It’s C# .Net 2.0

Hi,

If you only want to ForegroundColor, you have to set the fill pattern,otherwise it will not effect. See following codes:

style.ForegroundColor = System.Drawing.Color.Red;
style.Pattern = BackgroundType.Solid;

And please check the doc http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/colors-background-patterns.html