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 2009/10/28 19:32:10 UTC

DO NOT REPLY [Bug 48079] New: POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1

https://issues.apache.org/bugzilla/show_bug.cgi?id=48079

           Summary: POI reportSheet.autoSizeColumn
                    java.lang.ArrayIndexOutOfBoundsException: -1
           Product: POI
           Version: 3.5-FINAL
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: michael.ramirez@apollogrp.edu


This seems to be a repeat of Bug 45322, which was fixed for POI 3.2.  This is
now happening in 3.5-FINAL.

I'm getting the same outofboundsexception when performing an autoSizeColumn on
columns whose data format returns -1.

-- 
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 48079] POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48079

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2009-10-28 12:01:58 UTC ---
Can you attach a file and sample code to reproduce the problem? 3.5-FINAL works
fine for the file attached to Bug 45322. 

Yegor

-- 
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 48079] POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48079

--- Comment #3 from michael.ramirez@apollogrp.edu 2009-10-28 12:19:32 UTC ---
Attached code.  Unable to generate a file because it fails on autoSizeColumn.

-- 
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 48079] POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48079

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |LATER

--- Comment #6 from Nick Burch <ni...@alfresco.com> 2011-02-18 13:03:50 EST ---
In r1072093 I have added a test which shows we can size columns with very large
(>32767) numbers of rows without error. So, looks like this bug is no longer
present.

-- 
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 48079] POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48079

--- Comment #5 from neil.pugh@pancentric.com 2010-11-01 12:30:39 EDT ---
If you attempt to use org.apache.poi.hssf.usermodel.HSSFSheet and method
autosizecolumn(int) on a column after setting more than 32767 cells then
ArrayOutOfBoundsException is thrown.

I found this while accessing java via ColdFusion, i doubt you'll want my source
code! 

This major bug is still present in version 3.7.

-- 
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 48079] POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48079

--- Comment #2 from michael.ramirez@apollogrp.edu 2009-10-28 12:18:53 UTC ---
Created an attachment (id=24439)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24439)
XLSServlet.java generates spreadsheet data.

-- 
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 48079] POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48079

--- Comment #4 from michael.ramirez@apollogrp.edu 2009-10-28 12:26:17 UTC ---
FYI: The following line of code was added to bypass the exception:

if ( null != row.getCell(i) && null != row.getCell(i).getCellStyle() &&
row.getCell(i).getCellStyle().getDataFormat() > -1 )

With that line removed, the exception occurs at:

sheet.autoSizeColumn((short)i);

-- 
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