On 16-Apr-2010, at 10:21, David Fisher wrote:

>>>> What I don't seem to understand is why the Excel 2003 parser (HSSF) is 
>>>> being used when I call WorkbookFactory.create() on this file, instead of 
>>>> the Excel 2007 parser (XSSF). The file ends in '.xlsx'.
>>> 
>>> Since you got the output that you did from POIFSLister, it's clear that 
>>> your document in an OLE2 document, not an ooxml one. That's also why you 
>>> get the exception you do when you try to load it with XSSF.
>> 
>> The odd thing is that if I try resaving it as a new Office 2007 file or a 
>> new Office 2003 the file, with Excel 2007, it still can't be read by POI, 
>> even if it they can be reopend with Excel. Its almost as if it is a data 
>> issue.
>> 
>> Additional investigation: I tried opening the file with "Numbers" on the Mac 
>> and it couldn't open it. Trying to open it with Office 2008, on MacOS X, and 
>> I get the message "The workbook contains content that is not supported  by 
>> Excel  2008 for Mac: OLE DB query tables". Trying to unzip the, or look at 
>> it in a hex editor indicates this is not zipped content.
>> 
>> I am really going to have to investigate how this file was created in the 
>> first place, and why Excel is saving an apparent Office 2007 is saving the 
>> document as OLE. Is it possible that Excel will use the OLE format if there 
>> is a feature not supported by the OOXML format?
>> 
>> If any of the developers want to look at the file, I will happily supply it.
> 
> It looks like a strange case. If you find out how exactly it was created we 
> can see if and how POI might need to adapt.
> 
> I wonder if it is a "xlsb" file that says it is xlsx? But that's just a guess.

Its looks like it, though it is being specified as xlsx in Excel when saved. I 
am wondering whether OLE DB query tables, or some other data type in the 
document, can't be represented by OOXML, causing Excel to switch to xlsb? Looks 
like a point of investigation.

André
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to