https://bz.apache.org/bugzilla/show_bug.cgi?id=59738
Bug ID: 59738
Summary: Excel Files generated using XSSFWorkbook can't be
opened using Ms-Excel or OpenOffice
Product: POI
Version: 3.14-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 33969
--> https://bz.apache.org/bugzilla/attachment.cgi?id=33969&action=edit
Error in Excel
Excel Files generated using XSSFWorkbook can't be opened using Ms-Excel or
OpenOffice. POI can read those files.
I used the official BusinessPlan example from the POI website:
https://poi.apache.org/spreadsheet/examples.html#business-plan
The xls file generated by this example works fine in all versions, but the xlsx
file can't be opened when using POI 3.11 or higher (including 3.14). POI 3.10.1
works fine.
Even an empty worbook (with just one sheet) cannot be opened when using xssf,
but works fine in hssf:
String format = "xlsx";
File outputFile = new File("C:/temp/output." + format);
Workbook wb = new XSSFWorkbook();
wb.createSheet();
try (FileOutputStream fileOutputStream = new FileOutputStream(outputFile);) {
wb.write(fileOutputStream);
}
--
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]