Free Support Forum - aspose.com

Border colors

For some reason when I try to set a border color it always stays as black.

oSheet.Cells(“M20”).Style.Borders(BorderType.BottomBorder).Color = Color.Black

…produces the same result as…

oSheet.Cells(“M20”).Style.Borders(BorderType.BottomBorder).Color = Color.Orange

The borders are ALWAYS blck, no matter what color I try to use.

Any suggestions?

I further testing I’ve found that nothing works when I use Color.xxx i.e. no borders, fonts, background colors etc are changed.

Is this because I’m still using a trial version?

Please check http://www.aspose.com/Wiki/default.aspx/Aspose.Excel/ColorAndPalette.html for reference.

I am using standard colors that are in the Excel palette.

i.e. Color.Red and Color.Orange are standard colors that are not working in my formatting.

The link you gave me takes me to another page that has a link to a standard color palatte. This link is broken!

Color.Red is standar color but Color.Orange is not.

Please check http://www.aspose.com/Wiki/default.aspx/Aspose.Excel/BorderSettings.html for reference.

If you still cannot figure it out, could you please post more of your code here? And which version of Aspose.Excel are you using?

Ok, working now that I’ve added Orange to the palette.
I thought Orange was a standard color.

Thanks.