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 2013/01/09 11:38:32 UTC
[Bug 54392] New: HSSFWorkbook initialization fail, with
RuntimeException during creation of HSSFSheet, caused by an unknown excel
format
https://issues.apache.org/bugzilla/show_bug.cgi?id=54392
Bug ID: 54392
Summary: HSSFWorkbook initialization fail, with
RuntimeException during creation of HSSFSheet, caused
by an unknown excel format
Product: POI
Version: 3.9
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: dev@poi.apache.org
Reporter: steveoreo@gmail.com
Classification: Unclassified
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
poi version: poi-3.9-20121203.jar
platform: windows xp
------------ source to reproduce is very simple:
String s = "excelfile.xls";
FileInputStream fis = new FileInputStream(file);
workbook = new HSSFWorkbook (fis);
and then it would trigger this.
it would be nice if it can be fixed. or at least with an extra constructor
boolean to disable this check & throw.
// Some tools (like Perl module Spreadsheet::WriteExcel -
bug 41187) skip the RowRecords
// Excel, OpenOffice.org and GoogleDocs are all OK with
this, so POI should be too.
if (rowRecordsAlreadyPresent) {
// if at least one row record is present, all should be
present.
throw new RuntimeException("Unexpected missing row when
some rows already present");
}
Since I am very eager to use poi for this excel file, I disabled this throw
statement and the rest of the parising can run perfectly fine.
------------ Exception:
Error initializing Excel File:Unexpected missing row when some rows already
present
java.lang.RuntimeException: Unexpected missing row when some rows already
present
at
org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:195)
at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:120)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:292)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:243)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:187)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:322)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:303)
--
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 54392] HSSFWorkbook initialization fail, with RuntimeException
during creation of HSSFSheet, caused by an unknown excel format
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54392
--- Comment #2 from steveoreo@gmail.com ---
Created attachment 29831
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29831&action=edit
the excel file to reproduce
--
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 54392] HSSFWorkbook initialization fail, with RuntimeException
during creation of HSSFSheet, caused by an unknown excel format
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54392
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |LATER
--- Comment #4 from Nick Burch <ap...@gagravarr.org> ---
I've just tried the attached file with 3.10 Final, and it opens without error
--
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 54392] HSSFWorkbook initialization fail, with RuntimeException
during creation of HSSFSheet, caused by an unknown excel format
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54392
--- Comment #3 from steveoreo@gmail.com ---
The file is coming from internet web site.
I grep it and try to use poi to parse.
I attached in the bugzilla for your reference (sorry I missed it before).
thanks for your prompt response!
--
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 54392] HSSFWorkbook initialization fail, with RuntimeException
during creation of HSSFSheet, caused by an unknown excel format
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54392
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Where did the problematic file come from? If you try opening the file in excel
and doing a save-as, does that fix it?
--
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