Summary: | POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1 | ||
---|---|---|---|
Product: | POI | Reporter: | michael.ramirez |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED LATER | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.5-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: | XLSServlet.java generates spreadsheet data. |
Description
michael.ramirez
2009-10-28 11:32:10 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 Created attachment 24439 [details]
XLSServlet.java generates spreadsheet data.
Attached code. Unable to generate a file because it fails on autoSizeColumn. 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); 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. |