when named range of cells containing linked formulas from other sheets then #REF! will be displayed instead of linked data
Steps to Reproduce:
1. create an .ods file with formulas that contain both linked and direct data
2. add name to range of cells both linked and direct data
3. add externally linked data to separate sheet both linked and direct data
Formulas are overwritten with absolute path and therefore named cell range with linked data does not work anymore - formulas will be broken.
Formulas are NOT overwritten and named cell range with linked data works like cell range with non-linked data. When data is located in same file there is no point to use absolute path in formulas if it is the same file. Possibly there could be the choice "Sheet->Link to internal data..." where I can choose named range cell(s) in same file - that seems to be solve such issue.
User Profile Reset: No
When adding external linked data, also dead links are created with no element. Actually https://help.libreoffice.org/6.1/en-US/text/shared/01/02180000.html?System=UNIX&DbPAR=CALC#bm_id48899801 says that Element means "Lists the application (if known) that last saved the source file" but this is not true. The Element is actually the named cell range that has been used when external data link was created. Later I can change that named cell range by choosing "Edit->Links to External Files..." and after selecting appropriate line, click Modify... button and there is possible to change "Available Tables/Ranges" what are exactly those named range of cells. So - please fix also help text.
In addition "Edit->Links to External Files..." shows dead link with no Element referred. Possibly also such dead links are causing issue(s).
In addition while opening such file, the warning message "Automatic update of external links has been disabled" will be displayed. When trying to click "Enable Content" then message "The following external file could not be loaded. Data linked from this file did not get updated" and then gives full path to file, e.g. file:///home/student/testing/bug-link-to-external-data.ods and only choice is OK button. At the same time all data is updated as needed. Randomly it shows #REF! and then again not in tab "autorefresh-linked".
Actually before I click "Enable", I see #REF! and after that warning message "The following external file could not be loaded. Data linked from this file did not get updated" when I click "Enable Content", I suddenly see linked data properly.
When repeatedly opened the file - I did not even need to click "Enable Content" - formulas worked even with linked data. But occasionally there are #REF! on sheet "autorefresh-linked".
At the same time "Tools->Options->LibreOffice Calc->General->Update links when opening->Always (from trusted locations)" was selected but did not have effect for "Automatic update of external links has been disabled" message.
Created attachment 145867 [details]
linked data autorefresh even works regardless of warning message
here on sheet "autorefresh-linked" the autorefreshing even works regardless of warning message "Automatic update of external links has been disabled" even from LibreOffice settings there is "Update links when opening" set to "Always (from trusted locations)"
Created attachment 145868 [details]
here will be #REF! shown for linked data
Here you can see #REF! instead of proper output in sheet "autorefresh-linked". Still there is a warning message "Automatic update of external links has been disabled". Actually nothing has been disabled.
Created attachment 145869 [details]
email formula that suppose to be
here is the email formula as it was entered into cell
Created attachment 145870 [details]
email formula that has been overwritten
here you can see the overwritten email formula with absolute addresses
Created attachment 145871 [details]
password formula that suppose to be
here you can see the password formula as entered into cell
Created attachment 145872 [details]
password formula that has been overwritten
here you can see the overwritten password formula with absolute addresses
There was 64-bit Linux Mint 19 used where user student has been created and these .ods files were in testing folder, so the full path for files were:
Used VirtualBox 5.2.20 with appropriate extension pack installed + guest addition into virtual machine + all updates as of 20th october 2018 were also installed.
... 64-bit Linux Mint 19 with MATE desktop....
For LibreOffice there was an AppImage version (64-bit):
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 2; OS: Linux 4.15; UI render: default; VCL: gtk2;
Locale: et-EE (et_EE.UTF-8); Calc: group threaded
user interface was in U.S. English.
Log was linked to https://hub.libreoffice.org/git-core/65905a128db06ba48db947242809d14d3f9a93fe and it opened the address https://gerrit.libreoffice.org/gitweb?p=core.git&a=log&h=65905a128db06ba48db947242809d14d3f9a93fe
So, basically I started with bug-link-to-external-data-worse.ods file and made a copy of it to keep the initial file. While repeatedly opened that file (to check whether linked data works or not), there suddenly worked also that "autorefresh-linked" sheet. Then I renamed it to bug-link-to-external-data-better.ods and so I got two files with different state.
For AppImage variant, the LibreOffice-fresh.full-x86_64.AppImage was used.
(In reply to Edmund Laugasson from comment #0)
> Steps to Reproduce:
> 1. create an .ods file with formulas that contain both linked and direct data
> 2. add name to range of cells both linked and direct data
> 3. add externally linked data to separate sheet both linked and direct data
These steps contain too many sub-steps to be quick & easy to repro. For example, I can't understand how in step 1 we can have linked data, while the linked data is added in step 3. Please give more detailed steps with minimal formulas. Everything with file names we will save to etc. Not like the massive email formula you attached.
I gave prepared files with detailed explanation and this is the situation. This is not a comfortable bug but please see these files and you see the behaviour. Without seeing the files and knowing how to link the data, you will not understand the bug. When opening these files, you can see what data is manually entered and what is generated by formulas. Please see also named cells I am using.
Under preparing I mean by entering appropriate formulas. You can just copy the formulas in order to repeat the bug. These formulas just replace inappropriate symbols with appropriate one in e-mail addresses.
Please check my article with Google Translate - https://translate.google.com/translate?sl=et&tl=en&u=https%3A%2F%2Flibreoffice.ee%2Fautomaatne-varskendamine-calcis%2F - there is longer explanation with exact steps.
When repeating the issue, just copy my prepared data about characters and formulas as plain text to not copy possible buggy formatting. Repeat the autorefresh part only.
I know how to do all these things, but your steps not being exact enough is the reason none of our 20-30 triagers have touched this even though it has been 4 months.
In my humble opinion I included as much information as possible (especially example files) to show the bug. Sorry - I am not a developer (programmer) but hopefully it is enough to see and fix the bug. As far as I tested with 184.108.40.206 version the bug still persist. I guess LibreOffice should be capable for more than just beginner level, for more serious formulas and calculations. Current bug is not a beginner level due to complexity of formulas. These formulas are compiled step-by-step as they are complex. As you claim to understand all the steps then I guess I do not need to create a separate document with step-by-step guidance. I was afraid that this will too long and then nobody reads it. I tried to be as short as possible and did not describe obvious steps like copy formula, etc. To avoid those sub-steps I prepared files: both .ods (ready-to-use) and .txt containing formulas that when reproducing would be easier to copy just formulas (not formatting), perhaps fix cell addresses if needed. These .ods files are much simplified from original files already.
Can we have a *simple* example file please that does not involve such awkward lengthy formulas? Thanks.
(In reply to Edmund Laugasson from comment #0)
> Actual Results:
> Formulas are overwritten with absolute path and therefore named cell range
> with linked data does not work anymore - formulas will be broken.
That observation is not correct. The formula *displays* the absolute path (as always for external URIs). Whether subsequently loading a file will take an absolute or a relative URI depends on the settings when saving the file, Tools -> Options -> Load/Save -> General, Save URLs relative to file system.
I don't understand even why you are trying to link an "external" file that is not an external file but the very same document and have each link reload every second. Doing so might ask for trouble, yes, though in general it should be handled generously. For referencing data in the same document on a different sheet simply use 3D references such as $Sheet1.A1 or named ranges, either global or sheet scope level.
Sorry about complex formulas but these work and this is not the issue. If you look closer then I just solved the issue with random errors when people write names incorrectly, containing accidental non-relevant symbols. Also I solved an issue to generate strong passwords randomly. This table was necessary just to fix collected names and generate appropriate e-mail addresses with passwords for .csv file for users bulk creation. That file was born when two of the IT-managers from my community sent a request that can I solve such tasks with LibreOffice Calc like fix entered names with accidentally entered inappropriate symbols and generate usable e-mail addresses with strong passwords.
As I mentioned - this is not a simple, comfortable bug. Using one task with fixed names and generated e-mails, passwords for another task to offer an automatic refresh. As passwords are generated randomly then this was a good way to prove that auto refresh actually works when you see these values continuously renewing.
> That observation is not correct. The formula *displays* the absolute path (as always for external URIs).
Please see there are different files. One is working properly, another not (with #REF!)
> Whether subsequently loading a file will take an absolute or a relative URI depends on the settings when saving the file, Tools -> Options -> Load/Save -> General, Save URLs relative to file system.
This setting is relative by default. But links will appear with absolute path that will give #REF! values. Sounds like that setting is not working.
> I don't understand even why you are trying to link an "external" file that is not an external file but the very same document and have each link reload every second.
Could not find another way to automatically refresh table on another screen. There was requirement from my community to solve the issue and that is what I found.
> For referencing data in the same document on a different sheet simply use 3D references such as $Sheet1.A1 or named ranges, either global or sheet scope level.
That is done in first file (27.46 KB .ods) where autorefreshing works.
In that sense I am confused - why I am getting #REF! When to compare the files where autorefresh works and file where it does not work then formulas are same. If you claim this is not a bug but feature then I am totally confused.
Current #120744 might be related with the bug #120736
(In reply to Edmund Laugasson from comment #19)
> Current #120744 might be related with the bug #120736
bug 120736 is fixed.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.