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 2009/02/26 09:21:14 UTC

DO NOT REPLY [Bug 46700] FormulaParseException thrown, when XSSFRow.shift(...) is called.

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


Yegor Kozlov <ye...@dinom.ru> changed:

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




--- Comment #1 from Yegor Kozlov <ye...@dinom.ru>  2009-02-26 00:21:11 PST ---
shiftRows fails because of an unknown name UOM. This undefined name is used in
formulas in the cells H2 and H3, and also in the data validation rule for J3.

The formula in H2 that can't be parsed looks as follows:
IF(ISERROR(VLOOKUP("",UOM,2,FALSE)),"",VLOOKUP("",UOM,2,FALSE))

Shifting a formula in XSSF includes the following operations:
 - parse formula into an array of tokens (Ptgs)
 - update column and row references of the parsed tokens according to the
shifting rule
 - serialize the updated Ptgs into string
 - update the formula value in the cell

To parse a formula all its parts must be defined. If FormulaParser fails to
resolve a token it throws FormulaParseException as in your case. 

Please note, that FormulaParser has been recently updated to handle names with
backslashes. With this change the exception message is different from reported.
Current code in trunk throws
org.apache.poi.ss.formula.FormulaParser$FormulaParseException: Specified named
range 'UOM' does not exist in the current workbook.

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