ArrayIndexOutOfBoundsException from autoSizeColumn() when writing 1,500 rows to XSSFWorkbook

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ArrayIndexOutOfBoundsException from autoSizeColumn() when writing 1,500 rows to XSSFWorkbook

snobbles
When more than 1,500 rows are written to an Excel spreadsheet using XSSF, the exception below happens.
I'm calling autoSizeColumn() after writing all data to the workbook.
Any ideas on this?

Thanks,
Emer

java.lang.ArrayIndexOutOfBoundsException: -32767
        at java.util.ArrayList.get(ArrayList.java:324)
        at org.apache.poi.xssf.model.StylesTable.getFontAt(StylesTable.java:200)
        at org.apache.poi.xssf.usermodel.XSSFWorkbook.getFontAt(XSSFWorkbook.java:719)
        at org.apache.poi.xssf.usermodel.XSSFWorkbook.getFontAt(XSSFWorkbook.java:67)
        at org.apache.poi.ss.util.SheetUtil.getCellWidth(SheetUtil.java:114)
        at org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:219)
        at org.apache.poi.xssf.usermodel.XSSFSheet.autoSizeColumn(XSSFSheet.java:337)
        at org.apache.poi.xssf.usermodel.XSSFSheet.autoSizeColumn(XSSFSheet.java:320)
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException from autoSizeColumn() when writing 1,500 rows to XSSFWorkbook

Nick Burch-2
On Thu, 14 Mar 2013, snobbles wrote:
> When more than 1,500 rows are written to an Excel spreadsheet using XSSF, the
> exception below happens.
>
> java.lang.ArrayIndexOutOfBoundsException: -32767
> at java.util.ArrayList.get(ArrayList.java:324)

Looks like a short vs int bug. Any chance you could open a new bug in
bugzilla for this, and ideally upload a short unit test that shows how to
trigger it?

Thanks
Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException from autoSizeColumn() when writing 1,500 rows to XSSFWorkbook

mskavim
In reply to this post by snobbles
I am seeing the same issue same exact error at line 2170 ...is there any fix for this?

I am using poi-3.9
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException from autoSizeColumn() when writing 1,500 rows to XSSFWorkbook

Nick Burch-2
On Wed, 25 Feb 2015, mskavim wrote:
> I am seeing the same issue same exact error at line 2170 ...is there any fix
> for this?
>
> I am using poi-3.9

POI 3.9 is a little old now, and there have been lots of fixes since then
- see everything from http://poi.apache.org/changes.html#3.9 upwards!

I'd suggest you try upgrading to POI 3.12 beta 1 (hopefully out in a few
days, assuming the vote on the release candidate that's currently underway
passes), then see if it's solved there

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException from autoSizeColumn() when writing 1,500 rows to XSSFWorkbook

mskavim
Nick, Thanks a lot ... I looking forward for 3.12 beat 1
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException from autoSizeColumn() when writing 1,500 rows to XSSFWorkbook

kiruthee
Did updating to latest poi version resolved the issue? It still doesn't seem
to work for me..



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]