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 2008/05/17 12:45:48 UTC
DO NOT REPLY [Bug 24207] [INFO NEEDED] Call HSSFName.getReference()
throwing java.lang.IndexOutOfBoundsException
https://issues.apache.org/bugzilla/show_bug.cgi?id=24207
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #9 from Yegor Kozlov <ye...@dinom.ru> 2008-05-17 03:45:47 PST ---
We still have the described behaviour in poi-3.1-beta1.
If a named range points to a deleted cell then an attempt to contruct
AreaReference results in ArrayIndexOutOfBoundsException.
Excel does not delete names when a cell is deleted and workbook can contain
such "invalid" named ranges.
I added HSSFName.isDeleted() which checks if the name points to a cell that no
longer exists.
When iterating over the names user should check if the name is valid:
if(hssfName.isDeleted()){
//named range points to a deleted cell.
} else {
AreaReference ref1 = new AreaReference(hssfName.getReference());
}
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