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

Yegor Kozlov <[email protected]> changed:

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

--- Comment #3 from Yegor Kozlov <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to