Menu

#14 QuattroPro formula expressions not imported correctly

untriaged
open
nobody
QuattroPro (1)
3
2018-02-05
2018-02-02
erAck
No

In LibreOffice 6.0 libwps is (accidentally by filter detection?) used as default filter for QuattroPro documents, unless the "Quattro Pro 6.0" file type is explicitly selected. Unfortunately libwps fails to import some formula expression functions and imports a result number instead. For example see the test case document https://bz.apache.org/ooo/attachment.cgi?id=27128 attached to https://bz.apache.org/ooo/show_bug.cgi?id=41688

On the second sheet ('Sheet2' which probably should be 'B' in QuattroPro terminology) in column F there are formula expressions, of which some are imported as numbers instead.

For a correct import of these formulas using the LibreOffice internal filter preselect "Quattro Pro 6.0" from the file type list before opening the file.

Discussion

  • alonso laurent

    alonso laurent - 2018-02-03

    Hello,
    Recently, I have modified a lot of things in the master source of libwps ( some concerning converting the formula, ... ), and now, I obtain the attached result. Can you check if this is better ?

    Notes:

    • concerning the formula, Quattro Pro stores the formula and their result, so it seems ok to convert them in a formula and a result's value,
    • concerning the sheet name's, "A", "B", "C", "D", ... are unamed Quattro Pro sheet name's while
      "Sheet1", "Sheet2", ... are default LibreOffice names, ...
    • concerning the dll functions, Quattro Pro stores in the file the dll lib name and the dll function name, I use these names for the "conversion".
     
  • erAck

    erAck - 2018-02-04

    The attached document looks correct in regard to this issue, for example cell Sheet2.F55 now contains a formula expression with IPMT(...) which previously it did not. Thanks.

     
  • erAck

    erAck - 2018-02-04

    Some function names are wrong though, e.g. deg() should be DEGREES(), rad() should be RADIANS(), getactdate() should be TODAY() and davg() should be DAVERAGE() instead to be recognized as ODFF spreadsheet functions. There may be more, if loaded in LibreOffice hit Shift+Ctrl+F9 for a forced recalc and check content of cells with #NAME? error.

     
  • alonso laurent

    alonso laurent - 2018-02-04

    I have corrected these ones in https://sourceforge.net/p/libwps/code/ci/6dbae66dfe640c6b56af0df5346fc70c246b7f76/. Concerning the other ones, the main problem is that there is ~150 functions (and hundred more if we count the dll functions) ; actually, I take some inspiration from the old filter to name them, but as I do not really know what they do in QuattroPro....

    Note:

    • if someone has a QPW8 password protected file which is not confidential, I am insterested. Ie. now, libwps must be able to read .wb3 files ; I already test that it can read the protected QPW7 files, but I have no protected QPW8 file to test...
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB