Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-471

API crashes/fails to set the format string of a cell in scientific notation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.6.2-incubating
    • None
    • simple api
    • None

    Description

      I need to create a ods document using the Apache ODF Toolking and to format the content of its cells.

      I was able to set a format for dates and simple numbers, but for some reason when I try to format with scientific notation it does not work. It fails to parse the string or it wraps the E00 into "E00"

      Row numRow = rows.get(1);
       numRow.getCellByIndex(0).setDoubleValue(9.12345678);
       numRow.getCellByIndex(0).setFormatString("0.000"); // works
        //numRow.getCellByIndex(0).setFormatString("0.00E+00"); // crashes
        //numRow.getCellByIndex(0).setFormatString("0.00E00"); // does not work, it becomes 0.00"E00"
      
      

      I also posted a question [ here | https://stackoverflow.com/questions/48709473/formatting-cells-with-apache-odf-toolkit-simple-api-and-java ]

      Attachments

        Activity

          People

            Unassigned Unassigned
            scanti81 Enrico Scantamburlo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: