C#-NPOI自定义颜色
ICellStyle s = workbook.CreateCellStyle(); s.FillForegroundColor = 0; s.FillPattern = FillPattern.SolidForeground;
((XSSFColor)s.FillForegroundColorColor).SetRgb(new byte[] { 252, 139, 139 });
旧的版本:
ICellStyle s = workbook.CreateCellStyle();
s.FillForegroundColor = 0; s.FillPattern = FillPatternType.SOLID_FOREGROUND; ((XSSFColor)s.FillForegroundColorColor).SetRgb(new byte[] {252, 139, 139});