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/09/14 21:04:55 UTC

DO NOT REPLY [Bug 45798] HSSFCell.toString() With 3D Refrence Causes IndexOutOfBoundsException

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


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Josh Micich <jo...@gildedtree.com>  2008-09-14 12:04:54 PST ---
Fixed in svn r695264.

Junit added.

The main problem seems to be that ref #1 in the EXTERNSHEET record, which
refers to sheet index 2, even though the worbook has only 2 sheets:

Offset 0x3954 (14676)
recordid = 0x17, size = 32
[EXTERNSHEET]
   numOfRefs     = 5
refrec           #0: extBook=0 firstSheet=0 lastSheet=0
refrec           #1: extBook=1 firstSheet=2 lastSheet=2
refrec           #2: extBook=2 firstSheet=1 lastSheet=1
refrec           #3: extBook=0 firstSheet=-1 lastSheet=-1
refrec           #4: extBook=0 firstSheet=1 lastSheet=1
[/EXTERNSHEET]


The fix for this bug involved removing the eager initialisation of the extern
SheetReferences.  As it turns out, the formula in cell B1 has a Ref3DPtg with
externSheetIndex=4 which resolves to sheetIndex 1.

Some investigation was done to see how Excel would handle a formula having
externSheetIndex=1 (sheetIndex 2).  Excel displays the formula as ''!$A2, but
also prompts the user about broken links.

Note - this fix is just for the sample code provided.  It's quite possible
(since the LinkTable is not fully understood) that POI may still fail in other
ways with this spreadsheet.

An unrelated issue was that BiffViewer crashed on the DrawingGroupRecord.  This
was not investigated any further.


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