poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44010] Can't open the saved XLS (corrupt file) by HSSF
Date Fri, 14 Mar 2008 19:42:50 GMT

--- Comment #16 from Michael Zalewski <zalewski@optonline.net>  2008-03-14 12:42:49
PST ---
There are two problems here. The first one is Bug_44010_NOTOK.xls, which has

The second problem is new.xls, which is *way* more complicated than it looks.
This workbook seems to have been created in Excel 2003 and contains many of
that version's newer features such as format extensions, enhanced protection
(of data from EXTERNSHEETs) and style extensions. The sheet also contains
Office Drawings (though nothing is visible on the sheet).

An Excel workbook can actually contain 4 types of sheets

1) A Worksheet is the most common. It contains rows and columns of data
2) A Macrosheet is very similar to a worksheet, but the data represents macros
to be executed on a worksheet. This is a holdover from Excel v2, and is no
longer used as far as I know.
3) A Chartsheet is a sheet that contains a chart. It has now rows or columns,
only a chart
4) A Dialogsheet is a sheet that contains a form. It also has no rows or

Most Excel workbooks contain only worksheets, and POI works quite well on these
types of workbooks.

The Excel file Bug_44010_NOTOK.xls which does not work contains a ChartSheet. I
suspect that HSSF has put some elements of a Worksheet (such as a ROW or COLUMN
record) that does not belong on a ChartSheet. It is possible to place a Chart
object onto a Worksheet (instead of using a ChartSheet).If youy did this, I bet
you would be able to process the spreadsheet with POI.

BTW, the Excel file which does work also contains a ChartSheet (but only one
ChartSheet). I was actually surprised to see that POI works with this.

This bug could be split into two.

1) Support for non-row and column sheet types such as ChartSheet and
DialogSheet (Bug_44010_NOT_OK.xls)

2) Support for Excel 2003 extended features (new.xls) I'm not sure what the
problem is in this case. I know there are several record types new in Excel
2003 that are present in this worksheet and not recognized by HSSF. Such record
types are blindly copied by HSSF, which might be incorrect if the record
contains internal pointers, or may result in an improperordering of the BIFF
records in the file output by HSSF.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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

View raw message