I posted awhile back on changes that can be made to the record factory for (ignoring) images. Those same changes would seem to apply here.

Doing it in an API fashion via some toggle of sorts is on my list of todos.

[EMAIL PROTECTED] wrote:
Hello all,

Apologies, I know similar questions come up often. However I have looked
in the archives and bugzilla, and I haven't found anything that seemed
directly relevant.

I was trying to open a (Excel 2002) XLS which contains a pivot table.
I was hoping to just fill in data, and when I re-opened Excel, it would
refresh the pivot table.

Trying this with POI 2.5.1 gives:

java.lang.reflect.InvocationTargetException
        ...
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java
:224)
        at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.jav
a:160)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
        ...
Caused by: java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
        at
org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
        at
org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
        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.ObjRecord.<init>(ObjRecord.java:61)

which I think is a known issue?

So, I've tried poi-3.0-alpha1-20050801.jar.
This doesn't give any error. But when I load the file in Excel (2002
SP3), it discards the PivotTable 'due to integrity problems'.

Can POI be used in this way? Is it a known problem?

Appreciate any advice.

Iain Shepherd


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons.

------------------------------------------------------------------------


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



--
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: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to