0
我正在使用NPOI使用C#(VS 2013)解析Excel文件。我希望得到一个细胞的backgroundColor和我这样做:使用NPOI的Excel:获取单元格的样式(backgroundcolor)
IEnumerator rows = sheet.GetRowEnumerator();
while (rows.MoveNext())
{
IRow row = (IRow)rows.Current;
foreach (ICell cell in row.Cells)
{
if (cell.CellStyle.FillBackgroundColor == 64)
{
...
}
}
}
问题是,不管细胞(黄,绿,没有颜色在所有),FillBackgroundColor值的backgroundColor的ist总是64.所以看起来,这不是存储颜色的地方。那我该如何得到它?
伊迪丝说:该cell.CellStyle.Index属性不同的所有细胞提前
感谢, 弗兰克