Free Support Forum - aspose.com

Aspose.excel - color

I was trying to format background with color, but got all Black

Dim excel As Aspose.Excel.Excel

excel = New Aspose.Excel.Excel

excel.Open("C:\sample.xls")

Dim w As Aspose.Excel.Worksheet = excel.Worksheets(0)

For i As Int32 = 1 To 50

w.Cells(15, i).Style.ForegroundColor = System.Drawing.Color.FromArgb(230, 229, 229)

w.Cells(17, i).Style.ForegroundColor = System.Drawing.Color.AliceBlue

Next

excel.Save("c:\ee1.xls")

System.Diagnostics.Process.Start("c:\ee1.xls")

I am using 3.5.0.3

Since you use colors not in standard palette, please add them to palette first. Please check http://www.aspose.com/Wiki/default.aspx/Aspose.Excel/ColorAndPalette.html for detail information.