ImportExcel icon indicating copy to clipboard operation
ImportExcel copied to clipboard

Export-Excel AutoFilter still does not work

Open scriptingstudio opened this issue 2 years ago • 2 comments

relates to #1408, #1286, may be more

This is not a bug but looks like a missing parameter.

I did not dig deep but just looked at Add-ExcelTable calls in Export-Excel. These calls know nothing how to set ShowFilter property. As a quick solution I added -ShowFilter:$AutoFilter in lines 216,434 and it worked!

Before this problem I had to get a table object and modify the property ShowFilter.

Because Excel by default activates ShowFilter property for newly created tables, then -AutoFilter should have a reversed logics, namely -NoAutoFilter. :-)

scriptingstudio avatar Jun 18 '23 10:06 scriptingstudio

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '23 13:08 stale[bot]

I'm having the same issue. I can create tables but I want the ability to turn off the filter buttons. I tried something similiar to what was tried above by adding a line in Add-ExcelTable before line #116 to simply set $tbl.ShowFilter = $false. Even stepped through the code to make sure the property was false before exiting the function, but it did not work.

mg07647 avatar Dec 28 '23 20:12 mg07647