My process works with excel files.
After opening the excel file, I need to clear any filters that may be applied.
But I can’t find a reliable way to check if filters are applied.
I tried using “Image Exists” activity to look for the following:
the down arrow box next to each column name when filters are on.
the filter icon from the “Sort & Filter” dropdown
the filter icon from Data tab.
These methods are unreliable and doesn’t always work.
Yes that is the hotkey to turn filters on/off.
If the file has filters on, then I want to send Ctrl+Shift+L once to turn of filters.
If the file doesn’t have filters on, then I want to leave it alone.
My problem is that I don’t know if the file has filters on or off to begin with.
Hi @arivu96,
I’ve tried checking for if the filter icon is highlighted or not, but because the icon doesn’t change, the robot doesn’t always get it right. Sometimes the filter is on but the robot sees it as off, and vice versa.
I was wondering if anyone knew of a more reliable way to check if filter is on/off.
If the filter is ON, when you send Ctrl+Shift+L, the filters are turned off.
If the filter is OFF, when you send Ctrl+Shift+L, Excel will try to turn on filter for whatever cells you have selected at the time.
If you have the header selected with filter on, alt+down will show the Filter options so you can navigate with keystrokes. I wonder if you can do that and look for the Search input box or something to check if Filter is on, cause if it can’t find it then it’s not on.