Hi,
I'm having a similar problem. I read Excel 97 spreadsheets that were
written and saved in Excel itself, but I do not get the formula values -
they are always 0.0.
I'm a little confused by what you say about POI reading formulas. You say
that POI can only read the formula out, then that if you open and save in
Excel POI gives the correct result (is that the formula value ??).
If you could clarify the process by which POI can read a formula value
(i.e. the result of the formula not the formula itself) I would be very
grateful as it will currently save me a lot of work !!
Regards,
Alex B.
Michael Zalewski <[EMAIL PROTECTED]> on 17 Dec 2003 05:32
Please respond to "POI Users List" <[EMAIL PROTECTED]>
To: POI Users List <[EMAIL PROTECTED]>
cc:
bcc:
Subject: RE: How to get the value of a formula cell?
You can't do that with POI. If the cell contains a formula, you can only
get
the formula out.
You must let Excel do the calculation. Excel does this automatically when
the spreadsheet is opened. That's why opening and saving with Excel, then
looking at the cell with POI yields the correct result.
The idea here is that if you build a spreadsheet, you know what numbers you
put into C1 and C2, and can easily add them in your program.
Or, if you are processing an uploaded spreadsheet, you can read the values
of C1 and C2, then add them in your program.
POI does not, and perhaps never will, interpret or execute the formulas you
put into the spreadsheet.
-----Original Message-----
From: Suma G Shanthappa [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 4:16 AM
To: POI Users List
Subject: How to get the value of a formula cell?
I have a sheet with formula for cell C3. formula is sum(c1:c2)
I insert values to c1 and c2. If I try to get the value of C3 I get 0.0
How do I get the value of c3 cell? Even if i save all the data and then
try to open the file and try reading the value of c3 cell I get 0.0
But if I do save as and save the file with a diff name and try to read
the value of c3 cell, I get the correct value?
Any Idea how to retrieve the value of a formula cell from the same file
to which the data is stored to?
Thanks
Suma
---------------------------------------------------------------------
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]
******************************************************************
This message originated from the Internet. Its originator may or
may not be who they claim to be and the information contained in
the message and any attachments may or may not be accurate.
******************************************************************
_____________________________________________________
This transmission has been issued by a member of the HSBC Group
("HSBC") for the information of the addressee only and should not be
reproduced and / or distributed to any other person. Each page
attached hereto must be read in conjunction with any disclaimer which
forms part of it. This transmission is neither an offer nor the solicitation
of an offer to sell or purchase any investment. Its contents are based
on information obtained from sources believed to be reliable but HSBC
makes no representation and accepts no responsibility or liability as to
its completeness or accuracy.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]