Issue 41183

Summary: INDIRECT() fails with external range reference
Product: Calc Reporter: domno <vze5589y>
Component: uiAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P4 CC: issues
Version: OOo 1.1.4Keywords: ms_interoperability
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description domno 2005-01-24 09:21:29 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.
Comment 1 frank 2005-01-27 14:59:08 UTC
Hi Eike,

your construction site ? Please give us a short comment.

Frank
Comment 2 ooo 2005-02-03 13:53:53 UTC
In short: INDIRECT() fails with an external range reference, independent of
concatenation or usage of the result as an argument. Adjusted summary.
Comment 3 villeroy 2006-10-06 14:09:40 UTC
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.
Comment 4 ooo 2006-10-06 14:31:33 UTC
Villeroy,

Please re-read the description of this issue and note that your example
references a single cell, not a range.

Thanks
  Eike
Comment 5 frank 2007-01-12 13:07:03 UTC
*** Issue 69140 has been marked as a duplicate of this issue. ***
Comment 6 Marcus 2017-05-20 11:13:23 UTC
Reset assigne to the default "issues@openoffice.apache.org".