Amol Deshmukh <adeshmukh <at> hobsons-us.com> writes:
> > Nishant, > > Can you give more details as to what you mean by "read in > calculated value". Maybe a snippet of your code would > help better understand what you are attempting. I think > I understand what you are attempting but code says it > so much better than words - so if you can please post > the relevant code... > > Regards, > ~ amol > > PS: If I understand you right, what you are trying > should be possible by foll code: > // initialize HSSFFormulaEvaluator "evaluator" > CellValue cv = evaluator.evaluate(cell); > > // switch() on cv type and call appropriate > // ...cv.getXYZValue() method and call setCellValue(..) > > ...But this approach wont work with current version, > since: > 1. (see BUG 35288) > 2. HSSFFormulaEvaluator is still in development, it > workfs for a limited set of formulas only. > > > -----Original Message----- > > From: Nishant Chandra [mailto:nishant.chandra <at> gmail.com] > > Sent: Thursday, June 09, 2005 6:43 AM > > To: poi-user <at> jakarta.apache.org > > Subject: How do I read formula values?? > > > > > > Hello > > > > I am writing a formula in an excel sheet but when i try to read in the > > calculated value, i get an error. But if I manually open it in excel, > > save it and then read the values, it works. > > > > Is there a task to do for updating the formula in order to get its > > result if I dont want to use VB cos I dont want to create hetergenous > > solution to my problem. > > > > > > Thanks > > Nishant > > -- > > Website: www.cse.iitb.ac.in/~nishantc Amol, The formula I am using is an add on formula (Bloomberg Formula) and isnt a built in function in excel. So when I manually open the file and validate the formula (in the cell), I immediately get the values. But when I read the value (using getcellvalue), I only retrieve the formula which I wrote. Formula is not evaluated just on opening the file (wich is the case with built in functions). The problem is that I have to manually validate the formula in the cell. It then immediately gives me the values. I also went through the formula evaluator api which you mention. But there is no implementation of the formula as you mentioned. So is there any alternative to this? I hope this explains the problem, or else I can send the POI written excel file and you may just understand the problem. nishant --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
