We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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


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