[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-user
Subject:    Re: HSSF - Exception thrown when processing Outlook export
From:       "Andrew C. Oliver" <acoliver () apache ! org>
Date:       2006-03-10 1:09:55
Message-ID: 4410D1E3.4090909 () apache ! org
[Download RAW message or body]

I've not experienced that with any excel I've saved with Excel.  I have
seen that other office programs actually save some records in the 95
format which does cause this error.  However if that is true we should
fix it and support alternative record lengths for newer stuff.  This is
easy to look at.  Just change biffviewer and comment out records so that
you get UnknownRecord instead of Bof and then look at the hex dumps.

Tom Schindl wrote:
> I think that your problem is that the XLS is saved into a too new format
> I think I can remember this exception when loading Spreadsheets created
> with a new excel and saved them to the current excel format. Try saving
> it as Excel an older Excel Format.
> 
> Tom
> 
> Nick Heudecker wrote:
> 
>>I'm encountering the following exception when I upload an Excel spreadsheet
>>created by Outlook:
>>
>>java.lang.reflect.InvocationTargetException
>>    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>
>>    at sun.reflect.NativeConstructorAccessorImpl.newInstance(
>>NativeConstructorAccessorImpl.java:39)
>>    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
>>DelegatingConstructorAccessorImpl.java:27)
>>    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>>    at org.apache.poi.hssf.record.RecordFactory.createRecord(
>>RecordFactory.java:237)
>>    at org.apache.poi.hssf.record.RecordFactory.createRecords(
>>RecordFactory.java :160)
>>    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java
>>:183)
>>    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java
>>:230)
>>    at org.apache.poi.hssf.usermodel.HSSFWorkbook .<init>(HSSFWorkbook.java
>>:211)
>>    at example.service.impl.ContactServiceImpl.uploadContacts(
>>ContactServiceImpl.java:137)
>>// WEB STACK OMITTED
>>Caused by: java.lang.ArrayIndexOutOfBoundsException: 11
>>    at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:491)
>>    at org.apache.poi.util.LittleEndian.getInt(LittleEndian.java:139)
>>    at org.apache.poi.hssf.record.BOFRecord.fillFields(BOFRecord.java:133)
>>    at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
>>    at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
>>    at org.apache.poi.hssf.record.BOFRecord.<init>(BOFRecord.java:98)
>>    ... 48 more
>>
>>I don't seem to have this problem if I open the spreadsheet and save it
>>before uploading.  However, it dies if I try to process the file straight
>>from Outlook.  I save the entire file to a temp location before trying to
>>process it.
>>
>>I realize this is a little off the wall, but any help would be appreciated.
>>Worst case, I'll fall back to CSV format.
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>No virus found in this incoming message.
>>Checked by AVG Free Edition.
>>Version: 7.1.375 / Virus Database: 268.2.1/278 - Release Date: 09.03.2006
> 
> 



-- 
Andrew C. Oliver
SuperLink Software, Inc.

Java to Excel using POI
http://www.superlinksoftware.com/services/poi
Commercial support including features added/implemented, bugs fixed.


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic