I looked at the workbook level but never thought to check at the sheet level, sorry about that.
Anyway, glad you found a way that works and I will remember that for the future. Yours Mark B Patil Minal wrote: > > > Hi Mark, > > Controlling calculation is an option but I found an option within API > which forces recalculation of a sheet when you open it next time. And it > worked for me. > > sheetObject.setForceFormulaRecalculation(true) > > Thanks a lot. > > - Minal. > > -----Original Message----- > From: MSB [mailto:[email protected]] > Sent: Wednesday, June 17, 2009 10:14 PM > To: [email protected] > Subject: Re: Formula are not evaluated in POI when the cell value change > > > OK, a very quick look around but I have found some interesting > information. > > Firstly, I do not think there is anything available within the API that > allows you to force recalucation when the workbook is opened. > > Secondly, I found this bit of information that is very interesting IMO; > > "Controlling Calculation > > Excel has a range of options allowing you to control the way it > calculates. > You can change these options using the Tools -->Options-->Calculation tab. > > Calculation Settings Keep Changing > > Because a number of Excel's calculation settings work at the application > level (they are the same for all open workbooks), and are set by the first > workbook opened, they may appear to change randomly depending on the > sequence in which workbooks are opened. FastExcel Version 2 allows you to > solve many of these problems. > > Automatic Calculation. > > Automatic calculation mode means that Excel will automatically recalculate > all open workbooks at each and every change, and whenever you open a > workbook. > > Usually when you open a workbook in Automatic mode and Excel recalculates > you will not see the recalculation because nothing will have changed since > the workbook was saved. > > An exception is when you open a workbook in Excel 2000 that was saved > using Excel 97, or you open using Excel2002/2003 a workbook saved in > Excel2000: > because the Excel calculation engines are different a Full calculation is > done." > > So, there could be two reasons why you do not see that the formumlas have > been caculated when you open the workbook. Firstly, the automatic > caculation setting could have been changed when you or a user open a > workbook or, as is more likely I believe, because as far as Excel is > aware, the file has not changed. Of course, I could well be wrong. > > Yours > > Mark B > > > > Patil Minal wrote: >> >> Hi, >> >> I am using POI to populate a data sheet in a template. Another sheet >> in the workbook has references to data in this data sheet through >> VLOOKUP formula. Now if I populate data sheet cells using poi then the >> formulas on the other sheet do not read those values. The formula need >> to be evaluated manually by pressing F2 and then the values show up. >> Please preovide me guidance on this. The formulas on the other sheet >> should reevaluate since the cells the formulae are referencing are >> changed. >> >> >> - Minal. >> >> >> > > -- > View this message in context: > http://www.nabble.com/Formula-are-not-evaluated-in-POI-when-the-cell-value-change-tp24068885p24077559.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] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://www.nabble.com/Formula-are-not-evaluated-in-POI-when-the-cell-value-change-tp24068885p24087014.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]
