Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 FPSpreadsheet: no point/comma in ODS

closed-fixed
None
5
2009-07-01
2009-06-29
Axel Niedenhoff
No

When I write a double number to a worksheet (with the TSWorksheet.WriteNumber method) and save the spreadsheet to OpenDocument format, the number loses its decimal comma (the German version uses a comma instead of the point). So:

worksheet.WriteNumber(0, 0, 1.5);

would result in the number 15 being displayed in cell A1.

Discussion

    • assigned_to: nobody --> sekelsenmat
     
  • I have looked at little more into this.

    Observation 1: It works correctly for the XLS format (version 5, at least)

    Observation 2: The problem seems to be that in ODS, the following is produced:

    <table:table-cell office:value-type="float" office:value="1,5">

    Now it seems that OpenOffice Calc uses the value as specified by the office:value attribute, but cannot parse the comma. It has to be a period. Then Calc displays the value correctly. (Apparently, the <text:p>1,5</text:p>, which is also there, does not play a role.)

     
  • patch for fix

     
    Attachments
  • Can you try the attached patch.txt?

     
  • Your patch works. Great!

     
  • I committed the patch.

     
    • assigned_to: sekelsenmat --> vsnijders
    • status: open --> closed-fixed
     
  • Thank you so much!