← Back to team overview

dhis2-devs team mailing list archive

Re: Needed for support with jxl package

 

Hi Hieu

I know this doesn't really help you, but out of interest I've pasted
the relevant bit of an equivalent openoffice spreadsheet content.xml
below.  As you can see it is very similar to html.  If you can make
html tables you can make odf spreadsheets.  And you don't need a
special library - just write out the xml (and zip it up properly in a
ods file) ... and it gives the correct answer of '18' in openoffice.

  <office:body>
    <office:spreadsheet>
      <table:table table:name="Sheet1">
        <table:table-row>
          <table:table-cell office:value-type="float" office:value="10">
            <text:p>10</text:p>
          </table:table-cell>
          <table:table-cell office:value-type="float" office:value="8">
            <text:p>8</text:p>
          </table:table-cell>
          <table:table-cell office:value-type="float" office:value="0">
            <text:p>0</text:p>
          </table:table-cell>
          <table:table-cell table:formula="oooc:=SUM([.A1:.C1])"
office:value-type="float">
            <text:p></text:p>
          </table:table-cell>
        </table:table-row>
      </table:table>
    </office:spreadsheet>
  </office:body>
</office:document-content>

Regards
Bob

2009/6/16 Hieu Dang Duy <hieu.hispvietnam@xxxxxxxxx>:
> Dear all,
>
> I'm using the package as jxl (2.6).
> By using this one i've got the workbook of the identified excel file.
> My excel file has some of formulas in its content as following example:
>
> Ex:
>
>                            (Columns)
>
>                                 A                  B
> C                 D
> (Rows)    1                10                 8
> 0                 =SUM(A1:C1)
>               2                 -                   -
> -                  -
>
> These formulas were set-up and written into the excel file by Java.
>
> The issue was happened when i were reading this excel file and printing out
> value of each formula in each Cell as D1, it always return as 4.
>
> By the way, if i opened this file and had some of changing into its content
> then saving again.
> After that, re-checking is it return the correct value which is should be as
> 18.
>
> Any idea or suggestion on this entry ?
> Expecting for your all comments !
>
> p.s: I don't think the error at excel version or by the tool for designing
> it as MS Office, Open Office, ...
>
> Thanks !
>
> --
> Hieu.HISPVietnam
> Good Health !
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>



References