用NPOI怎么实现跨行垮列?还有怎么设置单元格的背景色,和字体颜色?
这样是没有颜色的
HSSFCellStyle style8 = hssfworkbook.CreateCellStyle();
style8.FillForegroundColor = NPOI.HSSF.Util.HSSFColor.WHITE.index;
style8.FillPattern = HSSFCellStyle.SQUARES;
style8.FillBackgroundColor = NPOI.HSSF.Util.HSSFColor.RED.index;
sheet1.CreateRow(7).CreateCell(0).CellStyle = style8;