Bug 107858

Summary: Autofilter is created differently in Excel macro compared to manual creation
Product: LibreOffice Reporter: Aron Budea <aron.budea>
Component: CalcAssignee: Tamas Bunth <btomi96>
Status: VERIFIED FIXED    
Severity: normal CC: btomi96, szymon.klos
Priority: medium Keywords: filter:xlsx
Version: 4.0.0.3 release   
Hardware: All   
OS: All   
Whiteboard: target:6.0.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 108908, 123807    
Attachments: Sample XLSM that behaves differently in Calc and Excel

Description Aron Budea 2017-05-15 04:14:17 UTC
Created attachment 133319 [details]
Sample XLSM that behaves differently in Calc and Excel

- Open the attached Excel spreadsheet (a slightly modified version of attachment 132647 [details] from bug 107238, but otherwise they are not related).
- For reference, create an autofilter by hitting AutoFilter button.

=> 1) Note that column B's autofilter dropdown contains 1, 2 and 3. This is correct.

- Undo the autofilter creation, or reload the spreadsheet.
- Run macro "AF" from the file.

=> 2) Now column B's autofilter dropdown also contains the date 2017-01-01.

Excel behaves like 1), so that would be the correct behavior.


Version: 5.4.0.0.alpha1+
Build ID: 68a1cb23ede1d4ae6195850190fca6953c30417f
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-05-14_07:04:56
Locale: hu-HU (hu_HU); Calc: CL
Comment 1 Aron Budea 2017-05-15 04:17:14 UTC
Also reproduced with 4.0.0.3 / Windows 7.
Comment 2 Commit Notification 2017-08-10 20:28:05 UTC
Tamas Bunth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e728965b3f5a37a6f0bd75d616d2acb16c40f71

tdf#107858 oovbaapi: Autofilter always has header

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 3 Aron Budea 2017-08-15 23:49:47 UTC
Verified that autofilter behaves the same in the following daily build:
2017-08-15_01:59:49 (bebaac5eb6ebd2db3e1ea22b1630111343a9c25c) / Windows 7.

Thanks for the fix!