I could very well be wrong because I have never had to do this sort of thing myself, but I think that after populating the sheet you need to force any and all formulae to evaluate themselves. You can find the code to do this on the following page;
http://poi.apache.org/spreadsheet/eval.html and I am guessing that you will need to look at the "Re-calculating all formulas in a Workbook" section. The reason I am saying this is that if you are using Excel and entering a value into a cell that could affect a formula elsewhere on a sheet then the application is aware of the change you have made and able to perform the re-calculation. However, when it reads a file, it is not aware that any changes have been made and will not automatically perform a re-calculation of the formulas. Also, at the back of my mind is the thought that it is possible to tell Excel to recalculate forumulae when it open a sheet. I cannot remember though if this is an option you need to set from within Excel itself. I will have a dig aorund and see what I can find. 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-tp24068885p24077312.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]
