Apache OpenOffice (AOO) Bugzilla – Issue 41183
INDIRECT() fails with external range reference
Last modified: 2017-05-20 11:13:23 UTC
When using a reference variable in a function call to an external file, the function works if a single cell is called, but does not work when a range is used. The issue arises when the external filename is necessarily a reference variable. Example: Cell A1 = "TEST" =SUM(INDIRECT(CONCATENATE("'file:///c:/";A1;".sxc'#$Sheet1.d1"))) will properly return the contents of C:\TEST.SXC, Cell D1. However, =SUM(INDIRECT(CONCATENATE("'file:///c:/";A2;".sxc'#$Sheet1.d1:d3"))) returns ERROR 502. The problem may be with the necessary use of INDIRECT, but the results are the same for other functions such as =MATCH, =LOOKUP, etc. where a 'range' is necessary. However, the fact that it does work with a call to a single cell implies it should work with a 'range', and that the formatting is otherwise correct. Note: The use of the operator "&" instead of CONCATENATE seems to produce the same result.
Hi Eike, your construction site ? Please give us a short comment. Frank
In short: INDIRECT() fails with an external range reference, independent of concatenation or usage of the result as an argument. Adjusted summary.
This issue seems to be invalid. I can use INDIRECT('file:///path/foo.ods'#$SheetName.A1) with a valid URL in OOo2.0.2 on Linux. I don't see any reason why it should not work with older versions since 'file:///path/foo.ods'$SheetName is nothing than a name of a hidden sheet, keeping a data-copy of SheetName in file /path/foo.ods. The INDIRECT()-function even establishes the required link in case it is missing.
Villeroy, Please re-read the description of this issue and note that your example references a single cell, not a range. Thanks Eike
*** Issue 69140 has been marked as a duplicate of this issue. ***
Reset assigne to the default "issues@openoffice.apache.org".