Inserting a link to a Range in an External Workbook returns the text "The link could not be updated."
Steps to reproduce:
1. In one workbook, say "ABC.ods", select a range and give it a name, say "ImportRange"
2. Save this workbook
3. Open another workbook.
4. Click on Insert-->Link to External Data, Browse to the workbook ABC.ods, Select the range name "ImportRange" and Click OK
The text "The link could not be updated." is displayed
The named range in the external workbook should appear.
This behaviour works fine in 18.104.22.168 (Debian)
Operating System: Debian
Version: 22.214.171.124 release
Can you please retest with 4.0.1? I fixed several bugs around cached value import and there was one for links to external data.
I installed and tried this with Version 126.96.36.199 (Build ID: 2c0c17a6e4bee0ee28131ea4bdc47edc700d659)
The problem of inserting an link to a named range in an external file still exists. The returned text is the same as in the problem definition.
Ok. Can you please attach a simple test document?
I'll have a look at it for 188.8.131.52
Created attachment 75823 [details]
Source and Target files for testing
For some reason (it's also the first time that I am submitting a file as an attachment), my comments did not get uploaded.
The zip file contains two files "Source.ods" and "Target.ods". The file "Source.ods" contains the months Jan to Dec in cells A1 to A12 and has the range name "Months".
The file "Target.ods", in range A1 contains a link to the range name "Months" in file "Source.ods", but currently shows only the text "The link could not be updated." Opening the file "Target.ods", you are asked if the links are to be updated. Nothing happens when you answer with a "Yes". What is expected that the values in the range "Months" should be populated in A1 to A12.
Hope this helps and thanks for your help in trying to fix this issue, since linking of worksheets is a function that many experienced users of spreadsheets use.
Created attachment 75824 [details]
Re-sending the attachment referred above
I had a similar problem only in some computers, and what i found was:
DOES NOT HAPPEN
- This problem DOES NOT happens when the computer runs v3.4.5 and v3.4.1
- DOES NOT happens anymore when we save the same file as ODS
- The problem DOES HAPPENS when the computer runs v184.108.40.206, v3.6.5, v220.127.116.11 and v18.104.22.168
- When the path have a "# (sharp/hashtag symbol)" and the file is saved as XLS, the "#" is represented by "%23" and works properly right after we confirm the formula, but when we close the file and then reopen it, the "%23" becomes "%2523". Thats why we get the message: "The link could not be updated".
If we take out the "#" of the path of the file, and edit the formulas, the problem is solved.
If we just edit the formula and take out only the "25" from "%2523" it works until close the file, whe we reopen it, the "%23" becomes "%2523" again.
Exemple creating a link to:
after close and reopen file becomes:
Hope it can help, for further explanation just let me know
I think the problem may lie in the following code from FindExtRange() in code file arealink.cxx:
const ScRangeData* p = pNames->findByUpperName(ScGlobal::pCharClass->uppercase(rAreaName));
const ScRangeData* p = pNames->findByUpperName(rAreaName);
As you can see in the latest version the search for a range name is successful only if the name is in uppercase.
To test this I created a file called data.ods with a data range called test.
When I opened another workbook and tried to create a Link to External Data the text "The link could not be updated." was displayed.
I then reopened the data.ods file and changed the range name to TEST. The Link to External Data request then worked and the data was imported.
I agree with Derek's analysis. In the "Source.ods: file that I had submitted earlier (Source.ods), I deleted the range "Months" and gave the same range the name "MONTHS"
In the "Target.ods", I first removed the existing link, since it was referring to "Months" in the "Source.ods" file. Inserting a new link to the range "MONTHS" in the file "Source.ods", works and brings in the data.
Thanks very much, Derek.
Hope this fix can be done quickly?
Although this is an earlier report - it's a dupe of a bug that has already had a bibisect.
Marking as such. Please put any additional comments on the other bug. Thanks!
*** This bug has been marked as a duplicate of bug 63407 ***