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 2010/09/03 08:25:12 UTC
DO NOT REPLY [Bug 49872] New: XSSFFormulaEvaluator.evaluateInCell()
with "shared" formula's
https://issues.apache.org/bugzilla/show_bug.cgi?id=49872
Summary: XSSFFormulaEvaluator.evaluateInCell() with "shared"
formula's
Product: POI
Version: 3.6-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: dev@poi.apache.org
ReportedBy: i8c.alex@gmail.com
If you have a shared formula, and you run evaluateInCell() on the original
formula, the referenced formula's will fail because the original formula can no
longer be found, XSSFCell throws a nullpointer exception on
"convertSharedFormula()" because "sfCell.getCTCell().getF()" is null.
I'm not entirely sure if this is a bug or a feature.
--
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 49872] XSSFFormulaEvaluator.evaluateInCell() with
"shared" formula's
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49872
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2010-09-12 05:15:31 EDT ---
It was a bug. The same workbook saved as .xls evaluates OK in HSSF.
When a group of cells shares a formula then only the first cell in the group
contains the actual formula expression. This is considered the 'master' formula
cell. Subsequent cells refer to the master by id and adjust the expression
based on the cell's relative location to the master formula.
FormulaEvaluator.evaluateInCell changes cell type. This method evaluates the
formula, and puts the result back into the cell, in place of the old formula.
In your case, the first call of evaluateInCell changed the master shared
formula and subsequent calls on dependent cells resulted in NPE.
I committed the fix in r996265. Now you can call evaluateInCell on a group of
shared formulas cells in any order - first master then dependent or first
dependent cells and then master.
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
DO NOT REPLY [Bug 49872] XSSFFormulaEvaluator.evaluateInCell() with
"shared" formula's
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49872
alex <i8...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
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 49872] XSSFFormulaEvaluator.evaluateInCell() with
"shared" formula's
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49872
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2010-09-04 11:27:48 EDT ---
I'm not quite sure how to reproduce it. Can you attach a sample file and Java
code that demonstrates the problem?
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
DO NOT REPLY [Bug 49872] XSSFFormulaEvaluator.evaluateInCell() with
"shared" formula's
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49872
--- Comment #2 from alex <i8...@gmail.com> 2010-09-06 03:03:50 EDT ---
Created an attachment (id=25990)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25990)
Example file and code
--
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