Hi,
I have problem with setting color for cell.
When I open the excel with 10K rows I receive the error:
Repaired Part: /xl/worksheets/sheet1.xml part with XML error. Load error.
Line 17480, column 34.
Removed Feature: Format from /xl/styles.xml part (Styles)
Removed Records: Cell information from /xl/worksheets/sheet1.xml part
Repaired Records: Cell information from /xl/worksheets/sheet1.xml part
btw: (output file has also strange gap between rows 2186 - 4370) :-/
note:
if I have small excel (1K) row the color is set ok
POI version 3.8
Excel version 2007 with SP3
simple test code:
public static void main(String[] args) throws Throwable {
int rowCount = 10000;
Workbook wb = new SXSSFWorkbook(100); // keep 100 rows in memory,
exceeding rows will be flushed to disk
Sheet sh = wb.createSheet();
for(int rownum = 0; rownum < rowCount ; rownum++){
Row row = sh.createRow(rownum);
for(int cellnum = 0; cellnum < 15; cellnum++){
Cell cell = row.createCell(cellnum);
cell.setCellValue("mock");
XSSFCellStyle style = (XSSFCellStyle) wb.createCellStyle();
style.setFillForegroundColor(IndexedColors.LIGHT_CORNFLOWER_BLUE.getIndex());
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cell.setCellStyle(style);
}
}
FileOutputStream out = new FileOutputStream("c:/sxssf.xlsx");
wb.write(out);
out.close();
}
thanks for advice.
Luke
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/SXSSFWorkbook-with-CellStyle-format-issue-big-file-tp5710422.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]