#3 FPSpreadsheet: no point/comma in ODS


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.


  • Vincent Snijders

    • assigned_to: nobody --> sekelsenmat
  • Axel Niedenhoff

    Axel Niedenhoff - 2009-06-29

    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.)

  • Vincent Snijders

    patch for fix

  • Vincent Snijders

    Can you try the attached patch.txt?

  • Axel Niedenhoff

    Axel Niedenhoff - 2009-07-01

    Your patch works. Great!

  • Vincent Snijders

    I committed the patch.

  • Vincent Snijders

    • assigned_to: sekelsenmat --> vsnijders
    • status: open --> closed-fixed
  • Axel Niedenhoff

    Axel Niedenhoff - 2009-07-01

    Thank you so much!


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks