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/09/15 23:10:17 UTC
DO NOT REPLY [Bug 47845] New: Cross-workbook name references
evaluate to NameXEval
https://issues.apache.org/bugzilla/show_bug.cgi?id=47845
Summary: Cross-workbook name references evaluate to NameXEval
Product: POI
Version: 3.5-dev
Platform: All
OS/Version: Mac OS X 10.4
Status: NEW
Severity: major
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: paul_bober@intuit.com
Created an attachment (id=24270)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24270)
reproduction of the bug
I have multiple workbooks and am referencing names from one workbook in a
second workbook. When evaluating formulas containing one of these cross
workbook name references using ForkedEvaluator I get the exception below.
I have reproduced the problem in the attached example. Book1.xls and Book2.xls
each have one sheet (Sheet1) with one cell (A1). Book1.xls has the name
"MyCell" which references "Sheet1!A1". [Book1.xls]Sheet1!A1 contains the
constant 100 and [Book2.xls]Sheet1!A1 contains the formula "=[Book1.xls]MyCell
+ 1" and thus should evaluate to 101 but instead yields an exception.
Note that if I take out the "+1" in the formula I no longer get the exception
but the result is a NameXEval object (not the expected NumberEval).
Note also if I rewrite the formula as "[Book1.xls]Sheet1!A1 + 1" it works. But
I would like to use the named references.
Paul
Exception in thread "main" java.lang.RuntimeException: Unexpected arg eval type
(org.apache.poi.hssf.record.formula.eval.NameXEval)
at
org.apache.poi.hssf.record.formula.eval.OperandResolver.coerceValueToDouble(OperandResolver.java:221)
at
org.apache.poi.hssf.record.formula.eval.TwoOperandNumericOperation.singleOperandEvaluate(TwoOperandNumericOperation.java:27)
at
org.apache.poi.hssf.record.formula.eval.TwoOperandNumericOperation.evaluate(TwoOperandNumericOperation.java:33)
at
org.apache.poi.ss.formula.WorkbookEvaluator.invokeOperation(WorkbookEvaluator.java:398)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:333)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:216)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:180)
at
org.apache.poi.ss.formula.eval.forked.ForkedEvaluator.evaluate(ForkedEvaluator.java:109)
at mypackage.poi.PoiBug.main(PoiBug.java:32)
--
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
DO NOT REPLY [Bug 47845] Cross-workbook name references evaluate to
NameXEval
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47845
dave.sprague@trintech.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dave.sprague@trintech.com
--- Comment #1 from dave.sprague@trintech.com 2010-03-18 22:41:42 UTC ---
I've discovered an issue (that appears to be similar to this issue) within an
application that we have build (using POI 3.6). I can provide examples as
needed, but is this specific issue slated for inclusion within POI 3.7?
Thanks,
Dave Sprague
Director, Product Management
Trintech
--
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
DO NOT REPLY [Bug 47845] Cross-workbook name references evaluate to
NameXEval
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47845
Paul Bober <pa...@intuit.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paul_bober@intuit.com
OS/Version|Mac OS X 10.4 |All
--
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