Bug 127301 - FILESAVE XLSX Adjusting autofilter range creates extra name range
Summary: FILESAVE XLSX Adjusting autofilter range creates extra name range
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: XLSX-Autofilter Excel-Default-Names
  Show dependency treegraph
 
Reported: 2019-09-02 23:21 UTC by Aron Budea
Modified: 2021-06-10 12:38 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODF with an autofilter set (8.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-09-02 23:21 UTC, Aron Budea
Details
Sample saved as XLSX in Calc (5.44 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-09-02 23:21 UTC, Aron Budea
Details
Sample XLSX with autofilter adjusted in Calc (and extra name) (5.46 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-09-02 23:23 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2019-09-02 23:21:30 UTC
Created attachment 153823 [details]
Sample ODF with an autofilter set

- Create a simple two-column spreadsheet, and add an autofilter to it (sample ODS attached).
- Save as XLSX, and reload.
- Select only the data in one of the columns (eg. A1-A4 in the sample), and click Autofilter. This adjusts autofilter, and only keeps it on the selected part.
- Save as XLSX, and reload.

=> Both columns have autofilter in Calc (in Excel only one has, as expected).
Open Sheet -> Named Ranges and Expressions -> Manage... It shows two names, for both the original and redefined ranges:
- _xlnm.FilterDatabase
- _xlnm.FilterDatabase_0

It should only show one range (ultimately it shouldn't show any, as _xlnm.FilterDatabase is a special named range for this purpose, and not for users to change, but that's a different issue). Excel's Name Manager also shows one entry, while it should show none.

Observed using LO 6.4.0.0.alpha0+ (0fb2927a8fe06e6c3255544b8e4c4c9c0f5a67d3) & 4.4.0.3 / Windows 7.
Comment 1 Aron Budea 2019-09-02 23:21:57 UTC
Created attachment 153824 [details]
Sample saved as XLSX in Calc
Comment 2 Aron Budea 2019-09-02 23:23:29 UTC
Created attachment 153825 [details]
Sample XLSX with autofilter adjusted in Calc (and extra name)
Comment 3 m.a.riosv 2019-09-03 19:47:11 UTC
I didn't review in detail but looks like a dup of https://bugs.documentfoundation.org/show_bug.cgi?id=116818.

There are a lot of bug about xlsx filter
Comment 4 Xisco Faulí 2019-10-16 12:18:36 UTC
Moving to NEW
Comment 5 Commit Notification 2021-05-10 10:40:55 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3cd6402c5443c8069c07d9e420d5ef5b43af6bef

tdf#127301 XLSX import: hide hidden named range of autofilter

It will be available in 7.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 6 NISZ LibreOffice Team 2021-06-10 12:38:01 UTC
Verifed in: 

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