Hi,
In attachment a small excel file: the font color for cells C6, C7, C8, C9 is __black__ (as can be verified by vba).
However ClosedXML returns the color __Silver__ for these cells.
Code snippet:
var wbSource = new XLWorkbook(@"d:\ColorBook.xlsx");
var ws = wbSource.Worksheet("Sheet1");
for (int row = 1; row < 10; row++)
{
Console.WriteLine("The result for cell C" + row + " is " + ws.Cell("C" + row).Style.Font.FontColor.Color.ToString());
}
I can't seem to find to code that causes the problem. Any suggestion for a work around is also appreciated.
Comments: I have no clue what's going on. The row has a font color index of 22 (gray/silver) and the cells don't have a font color. ClosedXML picks the font color from the row. This isn't what Excel is doing (it shows black) so again, I have no clue what's going on. I encourage you to dig into the issue and help me (and yourself) out.
In attachment a small excel file: the font color for cells C6, C7, C8, C9 is __black__ (as can be verified by vba).
However ClosedXML returns the color __Silver__ for these cells.
Code snippet:
var wbSource = new XLWorkbook(@"d:\ColorBook.xlsx");
var ws = wbSource.Worksheet("Sheet1");
for (int row = 1; row < 10; row++)
{
Console.WriteLine("The result for cell C" + row + " is " + ws.Cell("C" + row).Style.Font.FontColor.Color.ToString());
}
I can't seem to find to code that causes the problem. Any suggestion for a work around is also appreciated.
Comments: I have no clue what's going on. The row has a font color index of 22 (gray/silver) and the cells don't have a font color. ClosedXML picks the font color from the row. This isn't what Excel is doing (it shows black) so again, I have no clue what's going on. I encourage you to dig into the issue and help me (and yourself) out.