This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes XSSFFormulaEvaluator evaluate() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "XSSFFormulaEvaluator evaluate() method" Watch "XSSFFormulaEvaluator evaluate() method" New topic

XSSFFormulaEvaluator evaluate() method

Suba Muru

Joined: Dec 17, 2012
Posts: 2
Hi all,

I am using the 'evaluate' method of XSSFFormulaEvaluator. I need to know if this method will evaluate all the formula, if any, of the referenced cells as well.
To simplify my question:
I have a cell C1 which references A1 and B1. A1 in turn contains a formula referring to some other sheet of the same workbook, likewise B1 also has a formula,for eg, vlookup of some other sheet. In that case, if I call the evaluate method on C1, will that in turn evaluate the values of A1 and B1,and give me the resulting value of C1 based on these calculated values of A1 and B1?

Thanks for any inputs.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41182
That should be easy to test by creating a small spreadsheet and writing a few lines of POI code, no?

Ping & DNS - my free Android networking tools app
Suba Muru

Joined: Dec 17, 2012
Posts: 2
Hi, Thanks for the suggestion. I did that and tested. Looks like it evaluates formulae of referenced cells as well. But still I need someone who has worked on it to confirm. B'cos the workbook that I use contains a hell lot of formula and I do not want to take a chance.
I agree. Here's the link:
subject: XSSFFormulaEvaluator evaluate() method
Similar Threads
How to run GWT applications on tomcat or any other server.
Good style for comments in python code?
Which Design Pattern and how to design using OOP this scenaria
Need help in understanding JMockit Usage
usage of "this"