POI对Excel单元格进行颜色设置

学习了:http://www.myexception.cn/program/1932587.html

HSSFWorkbook workbook = new HSSFWorkbook();
HSSFCellStyle style = workbook.createCellStyle();
style.setFillForegroundColor(HSSFColor.LIME.index);
style.setFillBackgroundColor(HSSFColor.GREEN.index);
style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); // 要有这一句
05-11 11:26