Bug 98546 - EDITING sheet links created using a macro are not updated immediately
Summary: EDITING sheet links created using a macro are not updated immediately
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: Calc-External-Datalink
  Show dependency treegraph
 
Reported: 2016-03-09 11:05 UTC by Jean-Francois Nifenecker
Modified: 2019-07-05 02:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Source data (11.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-03-09 11:06 UTC, Jean-Francois Nifenecker
Details
Target spreadsheet (day2.ods) (13.54 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-03-09 11:07 UTC, Jean-Francois Nifenecker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Francois Nifenecker 2016-03-09 11:05:45 UTC
Hi,
when setting a link to an external spreadsheet with a macro, the values returned aren't immediately taken into account. This causes any attempt to VLOOKUP() the linked values to fail. The linked values are only taken into account after saving and reopening the spreadsheet.

Tested under LO Version: 5.0.1.2
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale : fr-FR (fr_FR.UTF-8)

This was functioning correctly until v.4.3.7 and is buggy from the next version onwards, as some have reported on the FR libreoffice users mailing list.

I attach 2 files that help understand the problem: the user creates daily documents with data carried forward from day1 to day2 and so on. This is done using a macro, called from a button click.

day1.ods is the original data. The data to be carried forward is in the 'to carry' sheet.

day2.ods has the same structure + the macro that demonstrates the problem.
Clicking the 'Carry forward' button on the 'work' sheet causes a link to be established with the day1.ods document, 'to carry' sheet. This feeds the day2.ods 'carried' sheet. This is obtained with the ChargerReports() sub.

A workaround is to create a supplemental dummy sheet in the target (say 'carried2') where cells get their values from the 'carried' sheet. These 'carried2' values can be searched or used immediately. This adds complexity to the spreadsheet, though, and causes a noticeable overhead when the source data is big.

Note that deleting the link or not has no influence on the faulty behaviour.
Comment 1 Jean-Francois Nifenecker 2016-03-09 11:06:26 UTC
Created attachment 123423 [details]
Source data
Comment 2 Jean-Francois Nifenecker 2016-03-09 11:07:00 UTC
Created attachment 123424 [details]
Target spreadsheet (day2.ods)
Comment 3 Michel Rudelle 2016-03-09 15:13:54 UTC
I confirm this bug, tested under Vista-32b with:
- Version: 5.0.5.2
  Build ID: 55b006a02d247b5f7215fc6ea0fde844b30035b3
  Locale : fr-FR (fr_FR)
- Version: 5.1.0.3
  Build ID: 5e3e00a007d9b3b6efb6797a8b8e57b51ab1f737
  Locale : fr-FR (fr_FR)
Comment 4 Jean-Francois Nifenecker 2016-03-09 15:56:33 UTC
(In reply to Jean-Francois Nifenecker from comment #0)
> 
> This was functioning correctly until v.4.3.7 and is buggy from the next
> version onwards, as some have reported on the FR libreoffice users mailing
> list.
> 

Please read:
This was functioning correctly until v.4.1.6.2 and is buggy from the next version onwards, as some have reported on the FR libreoffice users mailing list.

I unfortunately mixed both versions I'm currently working with on different platforms and computers.
Comment 5 Xisco Faulí 2017-09-29 08:53:46 UTC Comment hidden (obsolete)
Comment 6 Buovjaga 2018-05-25 11:54:24 UTC
Still repro.

Arch Linux 64-bit
Version: 6.1.0.0.alpha1+
Build ID: eeaf6dee2d278eaa037d95a756ad0ffab3314bc2
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 24th 2018
Comment 7 Buovjaga 2018-07-04 15:53:53 UTC
Bibisected on Ubuntu 14.04 with 42max. It had some launch crashes, so I had to skip several times. Fortunately it is a max repository, so has a very fine-grained group of commits.

I checked the "suspected bad commits" and this is what I found:
Kohei's big change: https://cgit.freedesktop.org/libreoffice/core/commit/?id=7333881bb7b04f7e4e2a28638024ae82a9c14e81
Formula tokens, formula cells and formula interpreters to use shared strings.

Kohei's related change committed at the same time: https://cgit.freedesktop.org/libreoffice/core/commit/?id=b3e35aa551fa8abc0215a0ef416fc9acbbc3c0d9
Fix VLOOKUP calculation when the matching value is literal string.

There was also this commit related to Calc external document references: https://cgit.freedesktop.org/libreoffice/core/commit/?id=d58d1719a49c5c25cce8ddfa7fef52b09d0f9957
Unused ScExternalRefCache::mrStrPool

Maybe the last one is improbably, but I thought I would mention it.
Comment 8 QA Administrators 2019-07-05 02:45:18 UTC
Dear Jean-Francois Nifenecker,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug