https://bz.apache.org/bugzilla/show_bug.cgi?id=60396
Bug ID: 60396
Summary: setWrapText not working for SXSSFWorkbook
Product: POI
Version: 3.15-FINAL
Hardware: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: SXSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
The setWrapText doesn't correctly interpret new line characters when using the
streaming version the Excel renderer. This can be demonstrated using and
amending the example code as follows:
SXSSFWorkbook wb = new SXSSFWorkbook(100);
Sheet sh = wb.createSheet();
for(int rownum = 0; rownum < 1000; rownum++){
Row row = sh.createRow(rownum);
for(int cellnum = 0; cellnum < 10; cellnum++) {
Cell cell = row.createCell(cellnum);
String address = new CellReference(cell).formatAsString();
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setWrapText(true);
cell.setCellStyle(cellStyle);
address += "\ntest";
row.setHeightInPoints((2*sh.getDefaultRowHeightInPoints()));
cell.setCellValue(address);
}
}
Switching the above code to use the XSSFWorkbook instead will correctly render
the spreadsheet.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]