You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/10/09 15:21:12 UTC
[Bug 53985] New: FileNotFoundException: no such entry: "Workbook"
while reading data from Excel file
https://issues.apache.org/bugzilla/show_bug.cgi?id=53985
Priority: P2
Bug ID: 53985
Assignee: dev@poi.apache.org
Summary: FileNotFoundException: no such entry: "Workbook" while
reading data from Excel file
Severity: normal
Classification: Unclassified
Reporter: emergency.shower@gmail.com
Hardware: PC
Status: NEW
Version: 3.8
Component: HSSF
Product: POI
In fact the xls-File (opened with 7-zip) contained the following entries:
[5]SummaryInformation
Book
[1]CompObj
[5]DocumentSummaryInformation
The Excel version read from CompObj was
Microsoft Office Excel 2003
Excel.Sheet.8
java.lang.RuntimeException: java.io.FileNotFoundException: no such entry:
"Workbook"
at
org.apache.poi.hssf.extractor.EventBasedExcelExtractor.getText(EventBasedExcelExtractor.java:141)
at ...
Caused by: java.io.FileNotFoundException: no such entry: "Workbook"
at
org.apache.poi.poifs.filesystem.DirectoryNode.getEntry(DirectoryNode.java:375)
at
org.apache.poi.poifs.filesystem.DirectoryNode.createDocumentInputStream(DirectoryNode.java:177)
at
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEvents(HSSFEventFactory.java:63)
at
org.apache.poi.hssf.extractor.EventBasedExcelExtractor.triggerExtraction(EventBasedExcelExtractor.java:157)
at
org.apache.poi.hssf.extractor.EventBasedExcelExtractor.getText(EventBasedExcelExtractor.java:134)
... 6 more
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53985] FileNotFoundException: no such entry: "Workbook" while
reading data from Excel file
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53985
--- Comment #5 from Nick Burch <ap...@gagravarr.org> ---
As listed on the POI site <http://poi.apache.org/spreadsheet/index.html> only
Excel 97+ formats are supported, Excel 95 (and before) are between a little and
a lot too different, and are not handled by POI, sorry.
(POI can give you the parts of the OLE2 document using POIFS, but not parse the
records)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53985] FileNotFoundException: no such entry: "Workbook" while
reading data from Excel file
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53985
Szymon Wilkołazki <wi...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|3.8 |3.9
OS|All |Windows 7
--- Comment #2 from Szymon Wilkołazki <wi...@gmail.com> ---
Hi,
I have the same issue. I have two different excel files from which cannot be
read. Both have the "Book" entry and do not have "Workbook". If I open them in
Excel 2007 and 'save as => excel 97-2003', then the files successfully open in
POI.
I have altered my code to try to read 'Book' entry instead of 'Workbook'. Both
files produce following exception:
org.springframework.web.util.NestedServletException: Request processing failed;
nested exception is org.apache.poi.hssf.record.RecordFormatException: Unable to
construct record instance
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance
org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:65)
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:301)
org.apache.poi.hssf.record.RecordFactoryInputStream$StreamEncryptionInfo.<init>(RecordFactoryInputStream.java:65)
org.apache.poi.hssf.record.RecordFactoryInputStream.<init>(RecordFactoryInputStream.java:182)
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSSFEventFactory.java:139)
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventFactory.java:106)
pl.veracomp.service.SpreadsheetImportService.process(SpreadsheetImportService.java:369)
pl.veracomp.controller.uploadController.onSubmit(uploadController.java:57)
org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:272)
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:268)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause
org.apache.poi.hssf.record.RecordFormatException: Not enough data (0) to read
requested (2) bytes
org.apache.poi.hssf.record.RecordInputStream.checkRecordPosition(RecordInputStream.java:216)
org.apache.poi.hssf.record.RecordInputStream.readShort(RecordInputStream.java:233)
org.apache.poi.hssf.record.InterfaceHdrRecord.<init>(InterfaceHdrRecord.java:43)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:57)
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:301)
org.apache.poi.hssf.record.RecordFactoryInputStream$StreamEncryptionInfo.<init>(RecordFactoryInputStream.java:65)
org.apache.poi.hssf.record.RecordFactoryInputStream.<init>(RecordFactoryInputStream.java:182)
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSSFEventFactory.java:139)
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventFactory.java:106)
pl.veracomp.service.SpreadsheetImportService.process(SpreadsheetImportService.java:369)
pl.veracomp.controller.uploadController.onSubmit(uploadController.java:57)
org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:272)
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:268)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
Unfortunatelly I cannot attach the files. They contain confidential data, which
I cannot remove without correcting the files.
Any ideas? How can I help resolve this issue?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53985] FileNotFoundException: no such entry: "Workbook" while
reading data from Excel file
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53985
Szymon Wilkołazki <wi...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #4 from Szymon Wilkołazki <wi...@gmail.com> ---
I have attached the file which helps reproduce the issue. It seems that the
problem is with Excel 5.0/95 file format.
Is this format supported, or do I need to force users to update the file format
and resubmit to my app?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53985] FileNotFoundException: no such entry: "Workbook" while
reading data from Excel file
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53985
--- Comment #3 from Szymon Wilkołazki <wi...@gmail.com> ---
Created attachment 30202
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30202&action=edit
The file which produces FileNotFound Exception (missing Workbook entry)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53985] FileNotFoundException: no such entry: "Workbook" while
reading data from Excel file
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53985
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
OS| |All
--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Do you know where the file comes from? Normal excel files use "Workbook" not
"Book" as the POIFS entry holding the data
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org