Summary: | ArrayIndexOutOfBoundsException when using Named Ranges | ||
---|---|---|---|
Product: | POI | Reporter: | Martin Allerstorfer <allerstorfer_martin> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.0-FINAL | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
test file
Patch to fix the bug 44167 : named ranges |
Description
Martin Allerstorfer
2008-01-04 05:08:16 UTC
Could you upload the problem file, and your java that triggers the problem (as a unit test if possible) Also, have you checked with poi 3.0.2 beta 1, as well as with 3.0.1 final? I used the example of the Quick Guide http://poi.apache.org/hssf/quick-guide.html#NamedRanges I found out that the problem is the getReference() method of the class HSSFName which returns an empty string. This empty string results in the exception when used as parameter in the constructor of AreaReference. I used the attached file and the Named Range 'test'. Created attachment 21344 [details]
test file
I tried it with version 8.0.2 beta 1 and 3.0.1 final without success. Created attachment 21355 [details] Patch to fix the bug 44167 : named ranges References are read correctly and ranges are read as real stuff. attachment '21344' should be saved as src/testcases/org/apache/poi/hssf/data/44167.xls Thanks for this patch Paolo. It does seem to have been quite a bit more tricky than it originally looked1 Patch applied Martin - please see the updated docs at http://poi.apache.org/hssf/quick-guide.html#NamedRanges For how to work with your non-contiguous ranges |