Description: Table formula MAX() is not working when opened in LO. Steps to Reproduce: 1. Create a new docx in Word. 2. Insert a table with some numbers. 3. Create a MAX formula in one of the cells. 4. Save it and open it in LO. Actual Results: The cells that contain a formula has a 0 in them regardless what was in them before. Expected Results: They should have the same number as in MSO. Reproducible: Always User Profile Reset: No Additional Info: LibreOffice details: Version: 6.3.0.0.alpha0+ Build ID: 17dd2662ccfa9d04efbea74e5d7548db5b2126d4 CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; Locale: hu-HU (hu_HU); UI-Language: en-US Calc: threaded
Created attachment 149181 [details] Screenshot of the original document side by side in Word and Writer.
Created attachment 149182 [details] A document which contains some MAX formulas.
Formulas debug:7354:7354: =MAX(BELOW) debug:7354:7354: =MAX(RIGHT) debug:7354:7354: =MAX(ABOVE) debug:7354:7354: =MAX(LEFT) Closing as a dupe of bug 123355 *** This bug has been marked as a duplicate of bug 123355 ***
Not resolved in bug 123355, it was about Average.
(In reply to Timur from comment #4) > Not resolved in bug 123355, it was about Average. A1 has =MAX(BELOW) (=13) A2 has =MAX(RIGHT) (=8) C3 has =MAX(ABOVE) (=7) D4 has =MAX(LEFT) (=15) in Word. Of these the two in column A are not rewritten and give 0 as result in current Writer, but the ones in columns C and D are rewritten (to MAX(<C2:C1>) and MAX(<C4:A4>) ), and give the expected result. Version: 7.1.0.0.alpha0+ (x64) Build ID: ed4f610f4a3de12016f8308a17b6ad4f86e9d67a CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL
Created attachment 165536 [details] fails with AVERAGE too This is no a problem with the formula MAX, it also fails with AVERAGE. The problem is using BELOW on cell A1
Created attachment 165539 [details] Modified version of the example file I don't think the problem is with the MAX function itself. More like with the replacement of the LEFT/RIGHT/ABOVE/BELOW specifiers.
Created attachment 165541 [details] Screenshot of the modified document side by side in Word and Writer Here I tried to break things but the only common pattern found yet is that any formula in the first column does not have its LEFT/RIGHT etc replaced.
@all: thanks for the nice catch and investigation! Handling of the first column missed completely. Interestingly, there was another problem, too: the original formula of the first cell wasn't grab-bagged, causing the same problem, but only in the cell A1: https://gerrit.libreoffice.org/c/core/+/102849
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d676d2c22f1d092c9978ffc1595b8356d8db1f7a tdf#123382 DOCX import: fix range IDs in column A 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.
Created attachment 165843 [details] 3rd example DOCX - Screenshot MSO LO with values I still see and issue here: values are not the same, maybe a priority problem. Please also explain why LEFT, RIGHT..are replaced instead of having similar functions.
(In reply to Timur from comment #11) > Created attachment 165843 [details] > Screenshot MSO LO with values > > I still see and issue here: values are not the same, maybe a priority > problem. > > Please also explain why LEFT, RIGHT..are replaced instead of having similar > functions. Which document are you using ? Should we just create a new ticket for it ?
Created attachment 166181 [details] 3rd example DOCX (In reply to Xisco Faulí from comment #12) > Which document are you using ? Should we just create a new ticket for it ? Same examples as here, except I added them to a single DOCX, it's here. Note: opening DOC is same is MSO and LO.
I close the bug, because the new file contains a circular reference in the second row of the second table. I think, circular references are unwanted in formulas of text tables. By the way, Word's results are worse in this example, see Word's number 18 in D1 with formula MAX(BELOW): there is no 18 below that cell. Maybe pressing F9 can fix there, too, maybe not, but for example, circular references are forbidden in Calc by default (you can switch on iterations in LibreOffice Calc->Calculation page, sometimes it's meaningful the result).