cell.CellStyle.FillPattern = FillPattern.SolidForeground;
byte r = (byte)226;
byte g = (byte)239;
byte b = (byte)218;
if (workbook is XSSFWorkbook)
{
cell.CellStyle.FillForegroundColor = 0;
((XSSFColor)cell.CellStyle.FillForegroundColorColor).SetRgb(new byte[] { r, g, b });
}
else
{
cell.CellStyle.FillForegroundColor = (((HSSFWorkbook)workbook).GetCustomPalette().FindSimilarColor(r, g, b)).Indexed;
}