You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/03/02 14:19:39 UTC
DO NOT REPLY [Bug 50853] New: Auto-size usage can seriously limit
row count
https://issues.apache.org/bugzilla/show_bug.cgi?id=50853
Summary: Auto-size usage can seriously limit row count
Product: POI
Version: 3.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: stormbringer@mail.com
Excel 2003 has 64K row limit and I can export up to 64K rows using POI, but
only if I don't use sheet.autoSizeColumn(i) method.
Here's a simple example that leads to this problem: try to create a sheet with
over 33K rows (I used 34K) and a single column. When data is written, call
sheet.autoSizeColumn to auto-fit the column and it breaks with this exception.
java.lang.ArrayIndexOutOfBoundsException: -32732
at java.util.ArrayList.get(ArrayList.java:324)
at
org.apache.poi.hssf.model.WorkbookRecordList.get(WorkbookRecordList.java:50)
at org.apache.poi.hssf.model.Workbook.getExFormatAt(Workbook.java:787)
at
org.apache.poi.hssf.usermodel.HSSFCell.getCellStyle(HSSFCell.java:906)
at
org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn(HSSFSheet.java:1727)
at
org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn(HSSFSheet.java:1662)
When there are more columns it breaks even sooner than that. My usecase has ~50
columns and it breaks even with 2K rows. It looks like it uses short int data
type and it goes out of range.
Let me know if you need more info.
Cheers
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 50853] Auto-size usage can seriously limit row
count
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50853
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Nick Burch <ni...@alfresco.com> 2011-03-02 08:26:19 EST ---
Can you try with a recent svn nightly build? Only there have been some auto
size fixes since 3.6, and you might find it's already been sorted
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 50853] Auto-size usage can seriously limit row
count
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50853
Bancika <st...@mail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #2 from Bancika <st...@mail.com> 2011-03-02 09:05:48 EST ---
Just tried with poi-3.8-beta1-20110302 and it still fails :(
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 50853] Auto-size usage can seriously limit row
count
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50853
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2011-03-03 03:57:46 EST ---
poi-3.8-beta1-20110302 fails, but with a different exception!
You are creating too many cell styles. The maximum number of cell styles in a
workbook is 4000, see
http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx
Cell Styles must be shared. Do not create per-cell, otherwise you will get a
“Too many styles” error in Excel when opening your workbook. Think of Cell
Styles like CSS and create them like that.
http://poi.apache.org/faq.html#faq-N100EF
Yegor
*** This bug has been marked as a duplicate of bug 49188 ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org