You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Tewari,kuldeep" <ku...@ind.xerox.com> on 2005/06/01 08:24:51 UTC

(HSSF API)Trouble reading changed Formula Cell values

Hi,

I am using 'org.apache.poi.hssf.usermodel' package to read an excel file
containing formulas.While reading the file,I change the values of some
Numeric cells(on which certain formulas are based in the original excel
file) and write all the values in to a new excel file,Using
HSSFWorkbook.write() function.
But when I  print the cell values by reading the newly created excel file, I
get the changed values only for the numeric cells that I changed
earlier.Formula cells retain their old values,but when I open that excel
file it shows the formula cell values are changed correctly.
Has it something to do with 'how and when' the formulas are calculated in
the MS Excel.(when I close the newly created excel file it opens a dialog
box with message "Do you want to save the changes you made in
'tempFile.xls'. Microsoft Excel recalculates the formulas when opening files
last saved by an earlier version of excel" .If I click 'yes' button and
again try to read that excel only then it gives me correct cell values.)   

Please throw some light in this issue,so that I can get through.
Thanks and regards.

Kuldeep.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/