Cells foregrouund color issue

Hi,

I am using aspose.cells sdk for processing excel files.

I have an excel file with one row which contains 9 columns with data.

I have changed 8th and 9th column foreground color as black.

But, while retrieving cells foreground color value through foreground color property I am getting foreground color name as 0 which means default color. Actual default foreground color for cell is white, I have changed that to black. But I am getting wrong value in foreground color property.

I have used following piece of code to retrieve foreground color.

RowCollection rows = workSheet.Cells.Rows;
Cell cell = null;
Style cellStyle = null;

cell = rows[0][8];
cellStyle = cell.GetStyle();
cellStyle.ForegroundColor.Name;

Here with I have attached excel file that I have used.

Kindly look into this issue and reply ASAP.

Thanks.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Hi,


I think it is fine. The RGB value of Black color is 0,0,0.
Workbook wb = new Workbook(“e:\test2\FontColorTest.xlsx”);
Worksheet workSheet = wb.Worksheets[0];
RowCollection rows = workSheet.Cells.Rows;
Aspose.Cells.Cell cell = null;
Style cellStyle = null;

cell = rows[0][8];
cellStyle = cell.GetStyle();
MessageBox.Show(cellStyle.ForegroundColor.R.ToString()); //0
MessageBox.Show(cellStyle.ForegroundColor.G.ToString()); //0
MessageBox.Show(cellStyle.ForegroundColor.B.ToString()); //0


RGB reference:
http://cloford.com/resources/colours/500col.htm