hi,I added sheet.setForceFormulaRecalculation(true); this time when I open the "001.xls" bu manully,I can see b8=300,but if I close the "001.xls" without save, I read the "001.xls" with java code the b8 is still equal to 30;and if I close the "001.xls" with save,b8 will be 300.
Anthony Andrews wrote: > > Excel has it's own rules that determine when and where it re-calculates > formulae. Have a look at the setForceFormulaRecalculation(boolean value) > > of the HSSFSheet class. By calling that method and passing the boolean > value 'true', you may get the results you require. > > --- On Tue, 7/8/08, Harold.Zhang <[EMAIL PROTECTED]> wrote: > From: Harold.Zhang <[EMAIL PROTECTED]> > Subject: Only after open the .xls file and save it by manually,I can read > the updated data. > To: [email protected] > Date: Tuesday, July 8, 2008, 11:47 PM > > Hi,all. > There is one file "001.xls",I write two datas into the file > "001.xls" such > as a1=10---->100,a2=20---->200. > b8=SUM(a1,a2),then I read the "001.xls",but the value of b8 is still > equal > to 30,not equal to 300.But after I open the "001.xls" and close the > "001.xls" with save option,then I can read b8 which value is 300. > Is there any method to avoid open and save the "001.xls" by > manually,and > just direct read the "001.xls" which b8's value is 300. > please help. > -- > View this message in context: > http://www.nabble.com/Only-after-open-the-.xls-file-and-save-it-by-manually%2CI-can-read-the-updated-data.-tp18355465p18355465.html > Sent from the POI - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- View this message in context: http://www.nabble.com/Only-after-open-the-.xls-file-and-save-it-by-manually%2CI-can-read-the-updated-data.-tp18355465p18356450.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
