On Wed, 2 Jan 2008, James G. wrote:
As a test case, I've created a workbook in Excel 2004 with a single row. Cells A1 and B1 are empty, and cell C1 has a simple formula: =SUM(A1*B1). Using POI, I open this workbook and populate cells A1 and B1, and save the workbook as a new file.

Under POI 3.0.x (both the final and the beta), I'm able to write the file successfully; however when the file is opened in Excel, the value for C1 is not calculated.

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

Under POI 2.5.1 with the same procedure, when the file is opened in Excel after writing from POI, the value in C1 is calculated correctly.

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.

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to