← Back to team overview

dhis2-devs team mailing list archive

Re: How to get the calculated value from an input formula string ?

 

What's wrong with these excel files ?

I've just attached two files:

"*Form - tx_bieu_2.xls1246341439640.xls*" <-- : Generated by POI (Code from
Murod)

"*admin30.06.2009.12.59.36.PMtx_bieu_2.xls*" <-- : Generated by JXL.

I opened one by one, and then do nothing on their contain.
After that, I closed each one and received a warning message (or a
confirmative message).
See more at the attached files below.


On Tue, Jun 30, 2009 at 10:58 AM, Hieu Dang Duy
<hieu.hispvietnam@xxxxxxxxx>wrote:

> Dear Murod and Bob,
>
> Murod, do you remember this mail ?
>
>
> ---------- Forwarded message ----------
> From: Hieu Dang Duy <hieu.hispvietnam@xxxxxxxxx>
>  Date: Mon, Jun 22, 2009 at 5:47 PM
> Subject: Re: [Dhis2-devs] Needed for support with jxl package
> To: Murodullo Latifov <murodlatifov@xxxxxxxxx>
> Cc: bobjolliffe@xxxxxxxxx, dhis2-devs@xxxxxxxxxxxxxxxxxxx
>
>
>
> Hi Murod,
>
> After using your project to generate a random excel file from my template,
> "*tx_bieu_2.xls*".
> I've got a new file, for example: "*Form - tx_bieu_2.xls1245381039109.xls*
> ".
>
> Your code is running very stable.
> By the way, I've tried to write a new java file for checking this new one's
> structure.
>
> And ,,, just only magic can change everything (*It means using POI
> checking the generated excel file's structure as same as JXL ... nothing was
> new*)
>
> You can get more reference with my attached files as below.
> Place the template file at the location "C:\"
>
> From the POI or JXL Excel API technique, I think the reason why we couldn't
> get the real values from the formula cells is that these values which is
> only calculated by itself tool (MS Office: .xls or Open Office: .odt). I
> mean we must open the generated file to see the correct answers at that
> time.
>
> *p.s*: Did you know how to get the data (value) by input as an string
> formula with POI ???
>
>
> *Thank you very much for all your ardour !*
>
>
>
> On Thu, Jun 18, 2009 at 5:19 PM, Murodullo Latifov <murodlatifov@xxxxxxxxx
> > wrote:
>
>> Hi Hieu,
>>
>> See attached as sample implementation of POI. Its Eclipse java project,
>> simply unrar and import to Eclipse, place this template in c:\, run Runner,
>> see new files created in c:\. It uses your template and fills in some random
>> data from list of list of integers. And finally places two formula and
>> styles it. Should help a lot. Also number of stylings are available, some
>> are used as example. For the rest consult
>> http://poi.apache.org/spreadsheet/quick-guide.html.
>>
>> regards,
>> murod.
>>
>
> --
> Hieu.HISPVietnam
> Good Health !
>
>
> I've read your code very carefully, Murod.
> And I assure that your coding which is running ok.
> The *setCellFormula*() method had done very well as its own duty. No
> matters how is here.
>
> After that, I sent to you all these two attached files:
> One is a java file which was written with POI.
> "*TestExcelReportPOI.java*"
> And the other one is an excel file which was generated by your coding
> "*Form - tx_bieu_2.xls1245381039109.xls*"
>
> In this java file, I used POI to test the structure of the excel file
> above.
> Then, the result is that I always receive all of the value as zero (0) at
> the each cell formulae.
> The same as when using JXL for testing.
>
> Did you remember about our previewing report module that I'd said before ?
> It had been done about 90%. And 10% is the formulae in the excel file. It's
> too worth.
>
> So, that why I posted this mail to ask you guys that
> "*Which method in which class, can be used to get the re-calculated value
> (please attending to **re-calculated value) of each formula cell by POI or
> JXL ?*" - That's the last way which I can do with the formulae cells
> up-to-now.
> Because, if using POI or JXL to get those real values directly is
> impossible. Don't you ?
>
> Anything is clearly now ?
>
> Thanks for your linked pdf file.
>
> *P.S*: The real values that is the calculated value which can be seen when
> opening its self tool (OpenOffice or MS Office Excel)
>
> --
> Hieu.HISPVietnam
> Good Health !
>
>


-- 
Hieu.HISPVietnam
Good Health !
   <javascript: leoHighlightsIFrameClose();>

Attachment: Form - tx_bieu_2.xls1246341439640.xls
Description: MS-Excel spreadsheet

Attachment: admin30.06.2009.12.59.36.PMtx_bieu_2.xls
Description: MS-Excel spreadsheet

Attachment: Confirm_with_POI.JPG
Description: JPEG image

Attachment: Confirm_with_JXL.JPG
Description: JPEG image


References