DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43408>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43408





------- Additional Comments From [EMAIL PROTECTED]  2007-09-20 08:00 -------
The file was produced by other external tool (not by Excel itself).
Unfortunately, I cannot cut-out sensitive data because once I open and save the
document in MS Excel then the BOF record inside the document is changed (fixed)
and document can be opened by POI.
BOF record of the problematic document looks like this:
Record identifier: 0809h ==> BIFF5-8
Offset (Length) Value: 0 (2) 0600h ==> BIFF8
Offset (Length) Value: 2 (2) 0005h ==> Workbook globals
Offset (Length) Value: 4 (2) 09D7h
Offset (Length) Value: 6 (2) 07CBh

It's obvious that this is non-Excel record but record written by external tool.
See for example Excel File Format description
http://sc.openoffice.org/excelfileformat.pdf
(chapters 5.8.1 and 5.8.2). If POI is supposed to accept not only Excel XLS
files but XLS files written by external tools as well, then it should be able to
allow (but ignore) optional fields in BOF record.
Some kind of solution for non standard BOF record is mentioned here
http://mail-archives.apache.org/mod_mbox/poi-dev/200706.mbox/[EMAIL PROTECTED]

...
protected void fillFields(RecordInputStream in)
    {
        field_1_version  = in.readShort();
        field_2_type     = in.readShort();
        if (in.getRecordOffset()<in.getLength())
           field_3_build    = in.readShort();
        if (in.getRecordOffset()<in.getLength())
           field_4_year     = in.readShort();
        if (in.getRecordOffset()<in.getLength())
           field_5_history  = in.readInt();
        if (in.getRecordOffset()<in.getLength())
           field_6_rversion = in.readInt();
    }
...



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to