You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by snobbles <em...@hotmail.com> on 2013/03/14 21:37:29 UTC

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

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)



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/ArrayIndexOutOfBoundsException-from-autoSizeColumn-when-writing-1-500-rows-to-XSSFWorkbook-tp5712347.html
Sent from the POI - User mailing list archive at Nabble.com.

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


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

Posted by kiruthee <Ki...@hexaware.com>.
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


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

Posted by mskavim <ms...@gmail.com>.
Nick, Thanks a lot ... I looking forward for 3.12 beat 1



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/ArrayIndexOutOfBoundsException-from-autoSizeColumn-when-writing-1-500-rows-to-XSSFWorkbook-tp5712347p5718064.html
Sent from the POI - User mailing list archive at Nabble.com.

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


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

Posted by Nick Burch <ap...@gagravarr.org>.
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


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

Posted by mskavim <ms...@gmail.com>.
I am seeing the same issue same exact error at line 2170 ...is there any fix
for this?

I am using poi-3.9



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/ArrayIndexOutOfBoundsException-from-autoSizeColumn-when-writing-1-500-rows-to-XSSFWorkbook-tp5712347p5718049.html
Sent from the POI - User mailing list archive at Nabble.com.

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


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

Posted by Nick Burch <ap...@gagravarr.org>.
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org