Bug 144636 - FILESAVE XLSX Named range pointing to external file is lost
Summary: FILESAVE XLSX Named range pointing to external file is lost
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0
Keywords: filter:xlsx
Depends on:
Blocks: XLSX
  Show dependency treegraph
 
Reported: 2021-09-21 09:53 UTC by NISZ LibreOffice Team
Modified: 2022-05-09 10:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
attachment 166828 saved with current Calc master (5.41 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-09-21 09:53 UTC, NISZ LibreOffice Team
Details
Screenshot of the saved-reopened file in Calc (53.10 KB, image/png)
2021-09-21 09:53 UTC, NISZ LibreOffice Team
Details
Screenshot of the exported document in Excel after removing an invalid named range (52.14 KB, image/png)
2021-09-21 09:53 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-09-21 09:53:03 UTC
Created attachment 175159 [details]
attachment 166828 [details] saved with current Calc master

This is a followup to bug 144397
When the attachment 166828 [details] is saved in Calc, the resulting file is invalid according to Excel.

Steps to reproduce:
    1. Open attachment 166828 [details]
    2. Save as XLSX
    3. Open that file in Excel

Actual results:
Excel repairs the file, says it has found invalid named range.

Expected results:
Correctly saved named range that is pointing to an external file.

LibreOffice details:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 770dcb1f717d576facf31efed14bee403e1a7155
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

safe to assume this would be a new feature, not a regression.
Comment 1 NISZ LibreOffice Team 2021-09-21 09:53:39 UTC
Created attachment 175160 [details]
Screenshot of the saved-reopened file in Calc
Comment 2 NISZ LibreOffice Team 2021-09-21 09:53:56 UTC
Created attachment 175161 [details]
Screenshot of the exported document in Excel after removing an invalid named range
Comment 3 m_a_riosv 2021-09-21 14:58:27 UTC

*** This bug has been marked as a duplicate of bug 137847 ***
Comment 4 NISZ LibreOffice Team 2021-09-23 07:30:01 UTC
(In reply to m.a.riosv from comment #3)
> 
> *** This bug has been marked as a duplicate of bug 137847 ***

No, this is a different issue.
The example file is referenced from bug 137846, but 
* bug 137846 and bug 137847 are about opening and saving the abomination in cell B3 
* while 144397 and this one is about opening and saving the abomination in cell B2

The solution for the latter two are in https://gerrit.libreoffice.org/c/core/+/122026 - Balázs told me this does not solve the issues with external data ranges (or Table names in Excel terminology).
Comment 5 Commit Notification 2021-10-11 07:04:03 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/12ee423c7549ddd2b86dfc3fc6fed2c617dcca7f

tdf#144397 tdf#144636 XLSX: cache external named ranges and their formulas

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 NISZ LibreOffice Team 2021-11-09 09:34:08 UTC
Verified in: 

Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 73334560b2dd2d60ac58d2cc2b1a5295490b03e1
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded