0
shouldn't this be working? fac is the uncolored workbook and facsheet is its uncolored sheet
片是彩色紙,我想從一個工作簿中的顏色,並將其設置到另一個POI,色彩行不工作
for(int i=2;rowIterator.hasNext();i++){
CellStyle style=fac.createCellStyle();
style.setFillForegroundColor(sheet.getRow(i).getRowStyle().getFillForegroundColor());
style.setFillBackgroundColor(sheet.getRow(i).getRowStyle().getFillBackgroundColor());
facsheet.getRow(i).setRowStyle(style);
}
FileInputStream file = new FileInputStream(new File(str +「」+「。xls」)); HSSFWorkbook workbook = new HSSFWorkbook(file); HSSFSheet sheet = workbook.getSheetAt(0); – 2013-05-01 18:08:50