You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Robert W. Wade" <rw...@yahoo.com> on 2008/09/06 01:12:48 UTC

Unable to open Excel File if a sheet contains a chart

I am using poi-3.1-FINAL-20080629.jar along with java 1.5 on OS X.

I have an Excel file created using Excel 2004 for Mac V 11.5.1 that contains 3 sheets. I am able to open this file using POI with no problems.

If I add a sheet and add a chart to that sheet (but the chart references no data) then I am still able to open the file.

If I modify the chart's source data and include 1 data 'series' then POI is unable to open the file. The exception I receive is:

org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance

along with

Caused by: java.lang.IllegalArgumentException: Illegal length - asked for 3 but only 1 left!
        at org.apache.poi.hssf.record.RecordInputStream.readUnicodeLEString(RecordInputStream.java:252)
        at org.apache.poi.hssf.record.SeriesTextRecord.fillFields(SeriesTextRecord.java:78)
        at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
        at org.apache.poi.hssf.record.SeriesTextRecord.<init>(SeriesTextRecord.java:56)
        ... 141 more

Is this a known issue and perhaps there is a workaround?

Thanks,

RW




      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org