My team are xlwings in Sypder (Python) to convert Excel tables into CSV format. When a table is filtered however, this alters the CSV output. Is there an xlwings command which can clear the filter from the active Excel sheet?
A similar command in VBA would be (from Excel 2013 VBA Clear All Filters macro):
Sub Macro1()
Cells.AutoFilter
End Sub
wb.sheets[sheetname].api.AutoFilterMode = False
Will remove the filter from the sheet, if you want to just clear the filter showing all the data without removing it you can use:
wb.sheets[sheetname].api.AutoFilter.ShowAllData()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With