Description: Formula handling inside tables is broken in Microsoft Office DOC or DOCX file formats. Steps to Reproduce: Steps to reproduce: 1. Open LibreOffice Writer 2. Insert table of any size - for example 4x4 3. Enter some numbers in the table cells 4. Go to the last (right bottom) cell, hit "=", enter "=sum(<A1:D3>)" 5. Save the document as Microsoft Office DOC or DOCX and close document 6. Open just saved DOC/DOCX document and change some numbers in table (try pressing F9 for sure) Actual Results: Actual results: * the formula in the table is not saved, the user is unable to calculate with it after saving file as DOC / DOCX Expected Results: Expected results: * the formula in the table is saved, the user is able to calculate with it after saving file as DOC / DOCX Reproducible: Always User Profile Reset: No Additional Info: Notes: the same happens if original document is DOC / DOCX. Saving table with formula removes the formula on next open. Test ODT document is in attachment. The almost latest LO 6.4.3.2 as in Ubuntu 20.04 LTS is also affected by this bug: Version: 6.4.3.2 Build ID: 1:6.4.3-0ubuntu0.20.04.1 CPU threads: 1; OS: Linux 5.4; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded
Created attachment 160997 [details] Simple table with formula to be saved as DOC/DOCX to demonstrate formula lose
Created attachment 160999 [details] A DOCX with a formula in table The document is created in Word 2016. The table has SUM(ABOVE) formula in the bottommost (A3) cell. So the issue is interoperability with Word formats, which are also able to have simple formulas. Both reading is imperfect, and writing. This is by no means HIGHEST/CRITICAL, of course.
This is critical because of data loss.
(In reply to Norbert X from comment #3) > This is critical because of data loss. No bug related to external file types is critical. Please don't start edit wars.
Ok, no problem. Just edited a bunch of documents, opened them and lost formulas in them.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/cf596c43315bb96b5e7256a82256f1ccb8c9c4d0 tdf#133163 DOCX: export formula cells It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Problem was fixed only for DOCX, because allowing field export in obsolete DOC format resulted broken formula in Word, likely missing DOC part of the previous fix for Bug 118682. Please, file a new bug for DOC (first, import) support, if needed.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/e5480bff53f3bd32fc922544f7d1c15854218ffc tdf#133163 DOCX: export formula cells It will be available in 7.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Verified in: Version: 7.1.0.0.alpha0+ (x64) Build ID: a3b4831208da615789bd1e2d5660dd130807f504 CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: threaded