Remove filters from excel using invoke code

Hey everyone,

Can someone share me the code for removing filters of the excelsheet.
Or a way to remove the filters from an excelsheet
Thank you

1 Like

Hi @berkaykor

We can use vba for this (put the code in a text file and call in invoke vba activity,

Sub Filter()
    if ActiveSheet.AutoFilterMode then
       Cells.AutoFilter
    end if
End Sub

Please refer this for how to use invoke vba activity,

Or you can also try the balareva package for removing the filter with a activity)

Thanks

1 Like

Hello thanks for the reply, but i prefer a invoke code to remove the filters do you have any idea on that?