NPOI 提供的颜色不足以满足我们的需求是可通过SetRgb设置我们需要的颜色。设置如下:
FillForegroundColor: foreground fill color
FillPattern:set to 1 to fill with foreground color
var style = workbook.GetCellStyle();
style.FillForegroundColor = 0;
style.FillPattern = FillPattern.SolidForeground;
((XSSFColor)style.FillForegroundColorColor).SetRgb(new byte[] { 221, 235, 247 });