ICellStyle BackgroundYellowCellStyle = Workbook.CreateCellStyle();
BackgroundYellowCellStyle.FillBackgroundColor = HSSFColor.Yellow.Index;
BackgroundYellowCellStyle.FillPattern = FillPattern.SolidForeground;
BackgroundYellowCellStyle.FillForegroundColor = HSSFColor.Yellow.Index;
Cell.CellStyle = BackgroundYellowCellStyle;
ICellStyle 接口的 FillForegroundColor 属性实现 Excel 单元格的背景色设置,
FillPattern 为单元格背景色的填充样式。
醉了~~~~