Bug 42794 - [PATCH] HSSF cannot read XLS files created by Microsoft Access
Summary: [PATCH] HSSF cannot read XLS files created by Microsoft Access
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-FINAL
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
: 43408 (view as bug list)
Depends on:
Reported: 2007-07-02 07:16 UTC by Richard Evans
Modified: 2007-11-12 13:53 UTC (History)
1 user (show)

patch for fillFields in BOFRecord (1.28 KB, patch)
2007-07-02 07:17 UTC, Richard Evans
Details | Diff
Zip containing Access database and XLS file from database (8.54 KB, application/octet-stream)
2007-07-02 08:06 UTC, Richard Evans

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Evans 2007-07-02 07:16:18 UTC
If you try an open an XLS file from Access using HSSF, you get a failure caused
by an ArrayIndexOutOfBoundsException.

This happens because the JET database codes does not write all of the fields in
a BOF record.

The patch just changes BOFRecord.fillFields to check for data before reading
fields 3-6.
Comment 1 Richard Evans 2007-07-02 07:17:11 UTC
Created attachment 20428 [details]
patch for fillFields in BOFRecord
Comment 2 Nick Burch 2007-07-02 07:26:03 UTC
Could you attach a sample problem file, so we'll have something to test against?
Comment 3 Richard Evans 2007-07-02 07:58:04 UTC
Will do, let me just fix the { in the summary ...
Comment 4 Richard Evans 2007-07-02 08:06:03 UTC
Created attachment 20429 [details]
Zip containing Access database and XLS file from database

The zip contains an XLS file which provokes the error, along with the Access
database that produced the XLS - right click on the table, select export, then
select Microsoft Excel 97-2003 as the form,at.
Comment 5 Richard Evans 2007-07-02 08:09:43 UTC
See section 6.8.2 in http://sc.openoffice.org/excelfileformat.pdf
Comment 6 Richard Evans 2007-10-29 05:43:51 UTC
Did this make it into 3.0.1?
Comment 7 Nick Burch 2007-11-12 05:13:26 UTC
Patch committed, thanks.
Comment 8 Nick Burch 2007-11-12 13:53:10 UTC
*** Bug 43408 has been marked as a duplicate of this bug. ***