RE: How to get the result of a formula ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: How to get the result of a formula ?

ROLLIN F         GssiItsRet

Hi Alessandro

I've made a little VB application wich open and save my Excel file generated with POI...

It's a bad solution but it's works....

Regards

ROLF
-----Message d'origine-----
De : Alessandro Santos [mailto:[hidden email]]
Envoyé : jeudi 5 mai 2005 20:30
À : POI Users List
Objet : Re: How to get the result of a formula ?


Hi ROLF

How did you handle with the problem of the getting some formula result
using POI?
I'm asking you, because I'm facing the same problem.
Let me know if you find any solutions, ok?

Regards,

--
Alessandro

On 5/4/05, ROLLIN F         GssiItsRet <[hidden email]> wrote:

> After several tests, I get the good values if , before I try to get the result of the formula, I write the file completed with all the "in" values, open it with Excel and save it into Excel.
>
> Does POI permit to simulate the Open and Save actions that I do in EXCEL ?
>
> Thanks in advance
>
> ROLF
>
> -----Message d'origine-----
> De : Armageddon [mailto:[hidden email]]
> Envoyé : mercredi 4 mai 2005 10:35
> À : POI Users List
> Objet : Re: How to get the result of a formula ?
>
>
> 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 <[hidden email]> 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: [hidden email]
> > 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: [hidden email]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply | Threaded
Open this post in threaded view
|

Re: How to get the result of a formula ?

Alessandro Santos
Hello Rolf,

Your solution is not that bad!

I'm developing a Java application for an academic research of mine in
a Brazilian University.
This application is supposed to use spreadsheets.

So, I choosed POI to save those spreadsheets.

But as I mentioned before, I'm facing the same problem you've been through:
I can not get formula results from POI written workbooks.

Would you mind to send me some sample code of what you've done with VB?

I'll be very glad if you do so.

Best regards,

--
Alessandro

On 5/11/05, ROLLIN F         GssiItsRet <[hidden email]> wrote:

>
> Hi Alessandro
>
> I've made a little VB application wich open and save my Excel file generated with POI...
>
> It's a bad solution but it's works....
>
> Regards
>
> ROLF
> -----Message d'origine-----
> De : Alessandro Santos [mailto:[hidden email]]
> Envoyé : jeudi 5 mai 2005 20:30
> À : POI Users List
> Objet : Re: How to get the result of a formula ?
>
> Hi ROLF
>
> How did you handle with the problem of the getting some formula result
> using POI?
> I'm asking you, because I'm facing the same problem.
> Let me know if you find any solutions, ok?
>
> Regards,
>
> --
> Alessandro
>
> On 5/4/05, ROLLIN F         GssiItsRet <[hidden email]> wrote:
> > After several tests, I get the good values if , before I try to get the result of the formula, I write the file completed with all the "in" values, open it with Excel and save it into Excel.
> >
> > Does POI permit to simulate the Open and Save actions that I do in EXCEL ?
> >
> > Thanks in advance
> >
> > ROLF
> >
> > -----Message d'origine-----
> > De : Armageddon [mailto:[hidden email]]
> > Envoyé : mercredi 4 mai 2005 10:35
> > À : POI Users List
> > Objet : Re: How to get the result of a formula ?
> >
> >
> > 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 <[hidden email]> 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: [hidden email]
> > > 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: [hidden email]
> > Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> > The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> > The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/