[Bug 61397] New: Unable to read excel using HSSFWorkbook in poi 3.8 but works fine in 3.0, I cannot downgrade the version.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61397] New: Unable to read excel using HSSFWorkbook in poi 3.8 but works fine in 3.0, I cannot downgrade the version.

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61397

            Bug ID: 61397
           Summary: Unable to read excel using HSSFWorkbook in poi 3.8 but
                    works fine in 3.0, I cannot downgrade the version.
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: HSSF
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

I am using an excel of version Microsoft Excel 97-2003 Worksheet (.xls). I am
trying to read the excel in java using following code. I am using poi 3.8
version
 fis = new FileInputStream(filename);
 HSSFWorkbook workbook = new HSSFWorkbook(fis);

I am getting the following error.
Exception in thread "main" java.lang.RuntimeException: Unexpected record type
(org.apache.poi.hssf.record.ColumnInfoRecord)
        at
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:107)
        at
org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:208)
        at
org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:163)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:296)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:248)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:192)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:327)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:308)
        at com.wona.ExcelExtractService.main(ExcelExtractService.java:28)


It works fine in poi 3.0 version, but i cannot downgrade to an older version.

On opening in excel and resaving it in different name the new excel works fine.
I cannot resave the excel and use all the time. Need a fix for it.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61397] Unable to read excel using HSSFWorkbook in poi 3.8 but works fine in 3.0, I cannot downgrade the version.

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61397

Javen O'Neal <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |NEEDINFO

--- Comment #1 from Javen O'Neal <[hidden email]> ---
Have you tried to open the workbook with a newer version of POI, such as POI
3.16? 3.8 is pretty old.

Are you able to share the Excel file?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61397] Unable to read excel using HSSFWorkbook in poi 3.8 but works fine in 3.0, I cannot downgrade the version.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61397

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Dominik Stadler <[hidden email]> ---
Sorry, we cannot help much if you can not provide any additional information
here.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]