Created attachment 85397 [details] Example spreadsheet demonstrating bug Problem description: When a .xlsm is opened, all FLOOR() formulae have a ,1 added to the end of their arguments, thus adding an argument. This happens even if it already has the maximum number of arguments (three), in which case the formula gives a 504 error the next time it is updated. Steps to reproduce: 1. Create a .xlsm 2. Add a FLOOR() formula anywhere within it 3. Repeatedly save and load Current behavior: Formula has extra argument added to it each time, no matter how many arguments it already has (causing errors if more than three present) Expected behavior: Formula does not have extra argument added to it if it already has three. Operating System: Windows 8 Version: 4.0.5.2 rc
Reproducible with 3.3.0.4 - 4.1.2.1, and also with AOO 4.0 under Win7x64. When LO opens an OOXML file (not only .xlsm) with FLOOR or CEILING, they both are supplied with an extra parameter ";1". The fact that this happens upon opening may be seen from the OOXML source: LO shows one more argument than there is in the xml source (xl\worksheets\sheetN.xml). It seems that xlsx doesn't accept FLOOR with three (or more) arguments (unlike xls, that accepts 3-argument FLOOR). Upon opening such file with 3+ arguments in FLOOR/CEILING, MS Excel complains about errors in file, and suggest repairing the file. When repaired, all such formulas are removed and the last computation result is left in the cells. AOO cannot save xlsx, but it adds extra parameter when opens it, too. Probably, the problem is somehow related to the fact that LO adds third parameter to FLOOR/CEILING when dealing with xls? But there only three parameters result, never 4 or more, and three parameters are OK in xls. As it impairs interoperability, I raise severity back to normal.
This sounds similar to 38592 which describes behaviour of adding extra arguments to CEILING for each cycle of editing, saving, closing and reopening XLSX files.
Patch submitted to Gerrit for review: https://gerrit.libreoffice.org/6746
*** This bug has been marked as a duplicate of bug 38592 ***