You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by ROLLIN F GssiItsRet <Fr...@socgen.com> on 2005/05/04 09:35:58 UTC
How to get the result of a formula ?
Hello
I'm using a complex Excel WorkBook to validate the result of a java program. In fact, I set values in different HSSFCell of HSSFWorkbook created from a model, and I try to read the result in a formula cell (wich already exists in the model).
When I use the getNumericCellValue() method, I get a NaN value...
Is there a task to do for updating the formula in order to get its result ?
Thanks
ROLF
=======================================================
Ce message et toutes les pieces jointes (ci-apres le "message")
sont confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite
au titre de ce message s'il a ete altere, deforme ou falsifie.
=======================================================
This message and any attachments (the "message") are confidential
and intended solely for the addressees.
Any unauthorized use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall be liable for the message if altered, changed or falsified.
=======================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: How to get the result of a formula ?
Posted by Armageddon <ar...@gmail.com>.
have you set the cell type using setCellType? (in case you had set it
to string type for writing the formula.
If the value in numeric cell is an invalid double value(as per
floating point representation), then it returns NaN (not a number)
for immediate checking, u may read the formula as a string. excel
evaluates the formula and updates the value everytime it is used.
On 5/4/05, ROLLIN F GssiItsRet <Fr...@socgen.com> wrote:
> Hello
>
> I'm using a complex Excel WorkBook to validate the result of a java program. In fact, I set values in different HSSFCell of HSSFWorkbook created from a model, and I try to read the result in a formula cell (wich already exists in the model).
>
> When I use the getNumericCellValue() method, I get a NaN value...
> Is there a task to do for updating the formula in order to get its result ?
>
> Thanks
>
> ROLF
>
> =======================================================
>
> Ce message et toutes les pieces jointes (ci-apres le "message")
> sont confidentiels et etablis a l'intention exclusive de ses destinataires.
> Toute utilisation ou diffusion non autorisee est interdite.
> Tout message electronique est susceptible d'alteration.
> La SOCIETE GENERALE et ses filiales declinent toute responsabilite
> au titre de ce message s'il a ete altere, deforme ou falsifie.
>
> =======================================================
>
> This message and any attachments (the "message") are confidential
> and intended solely for the addressees.
> Any unauthorized use or dissemination is prohibited.
> E-mails are susceptible to alteration.
> Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
> shall be liable for the message if altered, changed or falsified.
>
> =======================================================
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
>
--
"Do U have it in u?"
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
AW: How to get the result of a formula ?
Posted by "KHZ (SAW)" <ka...@sawag.com>.
Hi Rolf.
Formulas are evaluated by Excel at the next usage of the file.
Regards, Karl-Heinz.
-----Ursprüngliche Nachricht-----
Von: ROLLIN F GssiItsRet [mailto:Frederic.Rollin@socgen.com]
Gesendet: Mittwoch, 4. Mai 2005 09:36
An: poi-user@jakarta.apache.org
Betreff: How to get the result of a formula ?
Hello
I'm using a complex Excel WorkBook to validate the result of a java
program. In fact, I set values in different HSSFCell of HSSFWorkbook
created from a model, and I try to read the result in a formula cell
(wich already exists in the model).
When I use the getNumericCellValue() method, I get a NaN value...
Is there a task to do for updating the formula in order to get its
result ?
Thanks
ROLF
=======================================================
Ce message et toutes les pieces jointes (ci-apres le "message")
sont confidentiels et etablis a l'intention exclusive de ses
destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite
au titre de ce message s'il a ete altere, deforme ou falsifie.
=======================================================
This message and any attachments (the "message") are confidential
and intended solely for the addressees.
Any unauthorized use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall be liable for the message if altered, changed or falsified.
=======================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/