CellStyle cellStyle = wb.createCellStyle();
cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); //填充单元格
cellStyle.setFillForegroundColor(HSSFColor.RED.index); //填红色
r.getCell(1).setCellStyle(cellStyle);
java poi设置Excel单元格颜色
猜你喜欢
转载自blog.csdn.net/weixin_41722928/article/details/85246467
今日推荐
周排行