Bug 73210 - FILEOPEN: Opening .xlsx corrupts some INDIRECT formulas
Summary: FILEOPEN: Opening .xlsx corrupts some INDIRECT formulas
Status: CLOSED DUPLICATE of bug 70455
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Spreadsheet (show other bugs)
Version: 3.3.0 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: BSA
Keywords:
: 79282 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-02 00:35 UTC by Cedrick Collomb
Modified: 2015-01-22 20:17 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Sample .xlsx document exhibiting the issue (4.57 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-01-02 00:35 UTC, Cedrick Collomb
Details
New example showing SUM/AVERAGE/OFFSET/ADDRESS/INDIRECT (4.87 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-02-04 17:56 UTC, Cedrick Collomb
Details

Description Cedrick Collomb 2014-01-02 00:35:31 UTC
Created attachment 91402 [details]
Sample .xlsx document exhibiting the issue

INDIRECT is removed from some cells Problem description: 

Steps to reproduce:
1. Create a spreadsheet and add a formula like this =AVERAGE(A1:INDIRECT("A"&D1))/12
2. Save spreadsheet as .xlsx
3. Close spreadsheet
4. Reload spreadsheet

Current behavior:

Cell formula after reloading is =AVERAGE(A1:A1("A"&D1))/12 

Expected behavior:

Loaded formula should be the same as when saved and created =AVERAGE(A1:INDIRECT("A"&D1))/12

Additional note:

Saving the document as .ods does not exhibit this issue, but it is not interoperable with Excel so not a practical workaround.

              
Operating System: Windows 7
Version: 4.1.3.2 release
Comment 1 m.a.riosv 2014-01-02 03:22:34 UTC
Hi Cedrick, thanks for reporting.

Seems a duplicate of:
https://bugs.freedesktop.org/show_bug.cgi?id=70455
with the same issue but relative to 3.5.0 beta version.
Comment 2 Cedrick Collomb 2014-01-02 03:52:14 UTC
Similar but not strictly identical. Additional important information: works when loading .ods but does not work when loading .xlsx.

Problem is not saving, it is in loading. If I create the formula in excel it works, if I load the document in LibreOffice it breaks.

Also I am having the issue within AVERAGE and not inside SUM.
Comment 3 tommy27 2014-01-03 20:30:46 UTC
confirmed in LibO 4.1.4.2 under Win7 64bit
set status to NEW
Comment 4 Cedrick Collomb 2014-01-04 02:37:56 UTC
Forgot to mention that I unpacked the .xlsx after saving from LibreOffice and verified after saving that the content of sheet1.xml was accurate: <c r="D2" s="0" t="n"><f aca="true">AVERAGE(A1:INDIRECT(&quot;A&quot;&amp;D1))/12</f><v>0.541666666666667</v></c>
Comment 5 Cedrick Collomb 2014-02-02 23:14:14 UTC
This is still happening with 4.2.0.4
Comment 6 Cor Nouws 2014-02-03 15:14:50 UTC
@Cedrick: was this OK in earlier versions, that you know ?
Comment 7 GerardF 2014-02-03 15:37:49 UTC
Reproduce on 4.0.6, I do not have anymore earlier versions.

This don't affect only INDIRECT, but also OFFSET and ADRESS (not sure about this one.

This happenned when the : (separator for range_beginning and range_end) is followed by a function. Calc expect a reference here.
Comment 8 Cedrick Collomb 2014-02-03 19:42:24 UTC
Bug has been present at since 3.3.3 (also verified in 3.5.0 and 3.6.4).

Hope this helps.
Comment 9 Cedrick Collomb 2014-02-04 17:56:55 UTC
Created attachment 93397 [details]
New example showing SUM/AVERAGE/OFFSET/ADDRESS/INDIRECT
Comment 10 Cedrick Collomb 2014-02-04 17:57:53 UTC
Confirming this happens also with AVERAGE, SUM, OFFSET, ADDRESS, INDIRECT. Example .xlsx attached
Comment 11 sverson 2014-05-26 23:23:00 UTC
Confirming this happens also with INDEX.
Comment 12 Eike Rathke 2014-05-27 00:30:39 UTC
*** Bug 79282 has been marked as a duplicate of this bug. ***
Comment 13 Eike Rathke 2014-05-27 00:31:21 UTC

*** This bug has been marked as a duplicate of bug 70455 ***
Comment 14 Eike Rathke 2014-05-27 20:04:19 UTC
Just note that ADDRESS() returns a string and not a reference and can not be used with the range operator. In the second test case document the formulas in D6 and D7 are invalid anyway.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.