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.
Anonymous
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:
"Sheet1", "Sheet2", ... are default LibreOffice names, ...
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.
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.
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:
For the correct naming of functions in ODFF / ODF OpenFormula and parameters see https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.odt or https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html