日期:2014-05-17  浏览次数:20814 次

poi 操作单元格 背景色的问题

如上图,我本来就设置 圈中那一列为红色,结果其他的列也变红了,调试很久了,有大神对这个问题比较了解么??附代码:
for (int i = 5; i < 205; i++) {
rows = sheet.getRow(i);
cell = rows.getCell(1);
cell.setCellValue("@@@@@@@@@@@@@@@@@@@@");
style = cell.getCellStyle();

//     style.setFillBackgroundColor(HSSFColor.RED.index);
style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
    style.setFillForegroundColor(HSSFColor.RED.index);    //设置颜色为红色
cell.setCellStyle(style);
}
poi 调试

------解决方案--------------------
http://bbs.csdn.net/topics/390538287 看看这个
------解决方案--------------------

跑了下,没发现你的问题!