https://issues.apache.org/bugzilla/show_bug.cgi?id=55948
Bug ID: 55948
Summary: Opening empty workbook in read-only mode fails
Product: POI
Version: 3.9
Hardware: PC
OS: Mac OS X 10.4
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 31168
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31168&action=edit
empty workbook
When running the following code on the attached file, I get an exception. The
file was created by Microsoft Excel for Mac 2011, Version 14.3.9 (131030), by
creating a new workbook and saving it without making any changes.
new XSSFWorkbook(OPCPackage.open(file, PackageAccess.READ))
org.apache.poi.POIXMLException:
org.apache.poi.openxml4j.exceptions.InvalidOperationException: Operation not
allowed, document open in read only mode!
at
org.apache.poi.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:370)
at
org.apache.poi.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:330)
at
org.apache.poi.xssf.usermodel.XSSFWorkbook.onDocumentRead(XSSFWorkbook.java:274)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:159)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:186)
at
com.commercehub.griddle.poi.XSSFTabularDataSource.openWorkbook(XSSFTabularDataSource.groovy:24)
at
com.commercehub.griddle.poi.WorkbookTabularDataSource.withFile(WorkbookTabularDataSource.groovy:16)
at com.commercehub.griddle.poi.XSSFTabularDataSourceSpec.table rows have
expected values(XSSFTabularDataSourceSpec.groovy:62)
Caused by: org.apache.poi.openxml4j.exceptions.InvalidOperationException:
Operation not allowed, document open in read only mode!
at
org.apache.poi.openxml4j.opc.OPCPackage.throwExceptionIfReadOnly(OPCPackage.java:504)
at org.apache.poi.openxml4j.opc.OPCPackage.createPart(OPCPackage.java:762)
at org.apache.poi.openxml4j.opc.OPCPackage.createPart(OPCPackage.java:738)
at
org.apache.poi.POIXMLDocumentPart.createRelationship(POIXMLDocumentPart.java:350)
... 7 more
--
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]