On Jan 3, 2008, at 6:19 AM, Nick Burch wrote:

That is expected. You'll need to calculate the value yourself:
        http://poi.apache.org/hssf/eval.html

I experimented with the formula evaluator and was able to successfully evaluate the formulas. But, there didn't seem to be a way (I may not have dug deep enough) to leave the cell's value as the formula, rather than the result of the formula. I'd like to leave open the ability of the Excel user to update the dependent cells, and still have the formula cell update it's result, after being processed by POI.

The formula calculation triggered by poi 2.5.x was rather hit-and- miss, and in many cases wouldn't work properly (sometimes not calculating, often not re-calculating). With poi 3.x, you can evaluate the formulas properly, and know that they'll show the correct value every time.

The other drawback to this approach, is that I will ultimately be working with a much larger input file than my simple contrived example. While calculating the result for all the formulas contained in the workbook is not impossible, it's not necessarily desired, and would seem to remove a good deal of flexibility from the input file format.

Thanks for your input, Nick.
-James

Reply via email to