Apache OpenOffice (AOO) Bugzilla – Issue 101573
Open xlsx with multiline formula in a cell
Last modified: 2017-08-21 13:22:18 UTC
When I open a xlsx file with calc, if a cell contains a formula defined with multiple lines , calc only shows and use the first line of the formula
I can confirm within version DEV320m1,WinXP. Only first line of formula is imported.
Created attachment 65300 [details] test file. formula =A4+B4 +C4
Calc Rev. 1520602 gives correct answer of 3 (=1+2) Excel 2007 gives wrong answer of 6 (cell C4 is not part of the formula) Win 7
to reproduce: - open a new sheet in MS Excel - fill cell A1 with: 1 - fill cell B1 with: 2 - fill cell C1 with: 3 - add formula to D1: =A1+B1 (here use Alt+Enter to add a new line within the cell) +C1 - Excel calculates 6 to cell D1 - save the file, open it with OO Calc - Calc calculates 3 to cell D1 (because processing only the first line of the multiline formula) i use Excel 2013 (15.0.4953.1000 MSO 64-bit) and OO 4.1.3, Rev. 1761381 on windows 7.
Checked with new AOO versions.
Unzip the test file and open <folder>/xl/worksheets/sheet1.xml with a text editor. There one find the code: --- code xlsx begin --- <c r="D4"><f>A4+B4 +C4</f><v>6</v></c> --- code xlsx end --- Between “B4” and “+C4” there is simply a “newline”. Maybe the parser stops at this newline. AOO Calc doesn't allow a newline inside a formula. If one enter a newline it will always changed to a space. --- code ods begin --- table:formula="of:=[.A4]+[.B4] +[.C4]" --- code ods end ---