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

Pete Maher <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #3 from Pete Maher <[email protected]> ---
Hi Mark B

I think you have inadvertently honed in on the area of the problem in assuming
that the range reference string which I was using was that which is contained
in the exception - the salient point is that it isn't, POI is confused. (OK -
brave statement since I don't know POI particularly well but I'd be happy to
wager a small sum that this is a bug and not a user question!).

With a whole column range aNamedRange.getRefersToFormula() correctly returns
the String "Sheet1!$A:$A" - The exception in new
AreaReference(aNamedRange.getRefersToFormula()) says it has a problem with
"'Sheet1!$A'" which highlights the mismatching that POI appears to be doing.

Here is what to do in Excel (and the sample I uploaded was created in exactly
this manner):

* New Blank Workbook
* Click on the header of column A so that the whole column is highlighted
* Define a Name for this range called "MyColumn" (This should be for example
Sheet1!$A:$A)
* Put some data somewhere in column A so that the resultant AreaReference will
be expected to contain something
* Save as whatever.xlsx

Amend my earlier code to refer to your saved workbook.  Execute code, bingo.

Also worth noting that multiple whole column range reference have the same
problem (EG Sheet1!$A:$B).  Funnily enough whole row named ranges seem to work
fine (EG =Sheet1!$5:$5), albeit I've only taken a cursory glance at those.

Thanks.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to