HSSFWorkbook workbook = new HSSFWorkbook();
ICellStyle headStyle = workbook.CreateCellStyle();
headStyle.FillPattern = FillPattern.SolidForeground;headStyle.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.LightTurquoise.Index;
以下设置单元格格式:
***.GetCell(i).CellStyle = headStyle;