Summary: | POI reportSheet.autoSizeColumn java.lang.ArrayIndexOutOfBoundsException: -1 HSSFDataFormat.getFormat | ||
---|---|---|---|
Product: | POI | Reporter: | Partha <sarthy2000> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | sarthy2000 |
Priority: | P2 | Keywords: | ErrorMessage |
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: |
Sample report generated without calling autoSizeColumn
Excel Report Generator which is used to create the attached sample excel file |
Description
Partha
2008-07-01 17:09:21 UTC
Created attachment 22205 [details]
Sample report generated without calling autoSizeColumn
Created attachment 22206 [details]
Excel Report Generator which is used to create the attached sample excel file
First, I was using POI-3.1 beta-2 version. Then, tried with POI-3.1 Final Version. I get the same ArrayIndexOutOfBoundException: -1 in both the versions. I sent the code to Production. It is working fine for some scenario and not working for some other scenarios. Fixed in r676995. The method threw ArrayIndexOutOfBoundsException when style.getDataFormat() returned -1. Yegor 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); |