Bug 140469 - FILEOPEN XLSX Autofilter opened incorrectly with more than 8 filtering conditions
Summary: FILEOPEN XLSX Autofilter opened incorrectly with more than 8 filtering condit...
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: Balázs Varga
URL:
Whiteboard: target:7.2.0
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Autofilter
  Show dependency treegraph
 
Reported: 2021-02-17 10:04 UTC by NISZ LibreOffice Team
Modified: 2021-03-09 15:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Excel with 9 filtering conditions (8.90 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-02-17 10:04 UTC, NISZ LibreOffice Team
Details
Example file from Excel with 8 filtering conditions (8.95 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-02-17 10:09 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document with 9 conditions in Excel (80.42 KB, image/png)
2021-02-17 10:09 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document with 9 conditions in Calc (20.12 KB, image/png)
2021-02-17 10:10 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document with 8 conditions in Calc - this works fine (20.31 KB, image/png)
2021-02-17 10:11 UTC, NISZ LibreOffice Team
Details
Another example file with filtered date column (12.20 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-02-17 10:25 UTC, NISZ LibreOffice Team
Details
Screenshot of attachment #169817 in Calc master (72.41 KB, image/png)
2021-02-17 10:26 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-02-17 10:04:33 UTC
Created attachment 169812 [details]
Example file from Excel with 9 filtering conditions

Attached file was made in Excel and contains month names + values.
9 of these month names is filtered with an autofilter, so that 3 of the 12 is hidden.
This is opened correctly in Calc, but the autofilter dropdown displays all options checked.
If I filter out only 8 of the months, then the autofilter dropdown displays correctly the filtered values.

Steps to reproduce:
    1. Open attached files, roll down the autofilter of column A.

Actual results:
In the file with 9 conditions filtered, all options are checked and none unchecked. The autofilters dropdown is not blue.
In the file with 8 conditions filtered, only the 8 filtered options are checked and the 4 unchecked – correctly. The autofilters dropdown is blue.

Expected results:
In the file with 9 conditions filtered, 9 filtered options should be checked and 3 unchecked.

LibreOffice details:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 28555fc345ac2ccdda0e4e0f3c812c646befe68b
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-GB
Calc: CL

Also happens in 7.0, 6.0, 5.0, 4.0, 3.5.
Comment 1 NISZ LibreOffice Team 2021-02-17 10:09:38 UTC
Created attachment 169813 [details]
Example file from Excel with 8 filtering conditions
Comment 2 NISZ LibreOffice Team 2021-02-17 10:09:59 UTC
Created attachment 169814 [details]
Screenshot of the original document with 9 conditions in Excel
Comment 3 NISZ LibreOffice Team 2021-02-17 10:10:21 UTC
Created attachment 169815 [details]
Screenshot of the original document with 9 conditions in Calc
Comment 4 NISZ LibreOffice Team 2021-02-17 10:11:40 UTC
Created attachment 169816 [details]
Screenshot of the original document with 8 conditions in Calc - this works fine
Comment 5 NISZ LibreOffice Team 2021-02-17 10:25:47 UTC
Created attachment 169817 [details]
Another example file with filtered date column

This is attachment #141122 [details] from bug #116818 saved with current Calc master.

Here the filtering condition changes in the XML (but works the same in Excel), from:

    <filterColumn colId="0">
      <filters>
        <dateGroupItem year="2014" dateTimeGrouping="year"/>
        <dateGroupItem year="2012" dateTimeGrouping="year"/>
      </filters>
    </filterColumn>

changes is Calc export to:

    <filterColumn colId="0">
      <filters>
        <dateGroupItem year="2014" month="12" day="12" dateTimeGrouping="day"/>
        <dateGroupItem year="2014" month="12" day="13" dateTimeGrouping="day"/>
        <dateGroupItem year="2014" month="12" day="14" dateTimeGrouping="day"/>
        <dateGroupItem year="2014" month="12" day="15" dateTimeGrouping="day"/>
        <dateGroupItem year="2014" month="12" day="16" dateTimeGrouping="day"/>
        <dateGroupItem year="2014" month="12" day="17" dateTimeGrouping="day"/>
        <dateGroupItem year="2012" month="12" day="02" dateTimeGrouping="day"/>
        <dateGroupItem year="2012" month="12" day="03" dateTimeGrouping="day"/>
        <dateGroupItem year="2012" month="12" day="04" dateTimeGrouping="day"/>
        <dateGroupItem year="2012" month="12" day="05" dateTimeGrouping="day"/>
        <dateGroupItem year="2012" month="12" day="06" dateTimeGrouping="day"/>
      </filters>
    </filterColumn>

This puts it above the 8 conditions limit and fails to display in Calc.
Comment 6 NISZ LibreOffice Team 2021-02-17 10:26:37 UTC
Created attachment 169818 [details]
Screenshot of attachment #169817 [details] in Calc master
Comment 7 Xisco Faulí 2021-02-18 10:01:24 UTC
Reproduced in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: cbcec4425e04e3614a2025b49fdc221216ac51d3
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 8 Commit Notification 2021-02-25 13:54:00 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7ba76115b0e3baefae0ede66848f4340c7c7401b

tdf#140469 XLSX import: apply more than 8 filters

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 9 NISZ LibreOffice Team 2021-03-09 15:55:00 UTC
Verified in:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 72841008bf422dfd8553240b3a78f0474d03523c
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded Jumbo