Bug 157318 - Named ranges defined at the sheet level are not exported to XLSX
Summary: Named ranges defined at the sheet level are not exported to XLSX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.0 beta1+
Hardware: All All
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:24.2.0 target:7.6.3
Keywords: bibisected, regression
: 157906 (view as bug list)
Depends on:
Blocks: Cell-Name
  Show dependency treegraph
 
Reported: 2023-09-19 00:30 UTC by Rafael Lima
Modified: 2023-10-24 06:46 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
ODS file for testing (11.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-09-19 00:30 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-09-19 00:30:46 UTC
Created attachment 189684 [details]
ODS file for testing

When you create named ranges in an ODS file that are not global (instead their scope is a single sheet), then these named ranges are not exported to XLSX.

Steps to reproduce:
1) Open the attached ODS file. It has 2 named ranges (Test1 is global and Test2 is tied to Sheet1)
2) Open the Manage Names dialog to view the existing named ranges (Sheet - Named Ranges and Expressions - Manage)
3) Save this file as XLSX
4) Open the XLSX file and check the named ranges available
5) Notice that Test2 disappeared

This seems to have started with LO 7.6. I could not reproduce in 7.5.

System info

Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+wayland)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.1~rc2-0ubuntu0.23.04.1~lo1
Calc: threaded
Comment 1 m_a_riosv 2023-09-19 21:59:02 UTC
Reproducible with
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5416c9183384d46f9eb347871541c6ee1e30c28b
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded Jumbo
Comment 2 Rafael Lima 2023-09-21 06:54:01 UTC
I could not reproduce in LO 7.5.6. So I'm marking this as a regression.

System info

Version: 7.5.6.2 (X86_64) / LibreOffice Community
Build ID: f654817fb68d6d4600d7d2f6b647e47729f55f15
CPU threads: 12; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+wayland)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded
Comment 3 BogdanB 2023-09-23 13:09:03 UTC
 8b52d5ffccdb4b7b262ebe5e2a71cd58a915eeb5 is the first bad commit
commit 8b52d5ffccdb4b7b262ebe5e2a71cd58a915eeb5
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue May 23 12:23:07 2023 +0200

    source 639519dc2bad058197b6ff73c9e3df622f979f97
    
    source 639519dc2bad058197b6ff73c9e3df622f979f97

 instdir/program/libscfiltlo.so | Bin 6211496 -> 6211496 bytes
 instdir/program/setuprc        |   2 +-
 instdir/program/versionrc      |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
Comment 4 BogdanB 2023-09-23 13:13:00 UTC
tdf#100034: Fix to persistently remove print-range
Don't save print range if the builtin index is unknow
and sheet index is vaild (this is a deleted range).

Change-Id: I10dfa98ad4f24d0f5958053974bd75cb19c85147
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152081
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>

Lazslo, please, could you take a look?
Comment 5 Rafael Lima 2023-10-01 22:28:35 UTC
@Bogdan, as usual, thanks for the bibisect!

Here's a proposed WIP patch to fix this issue. Notice that it implements a different fix for the original issue in bug 100034.

https://gerrit.libreoffice.org/c/core/+/157455
Comment 6 Commit Notification 2023-10-09 14:06:50 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2705c53c9d444eb5a8126d97b3e1fc4ff010b9c0

tdf#100034 tdf#157318 XLSX export: fix lost named ranges associated to sheets

It will be available in 24.2.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 7 Commit Notification 2023-10-17 12:36:54 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/9395171aa8641341316f87e2537dcdfa3df4ef78

tdf#100034 tdf#157318 XLSX export: fix lost named ranges associated to sheets

It will be available in 7.6.3.

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 8 Stéphane Guillou (stragu) 2023-10-24 06:46:08 UTC
*** Bug 157906 has been marked as a duplicate of this bug. ***