cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frixel2
Helper I
Helper I

How to remove filter in excel online sheet?

Hi All,

Is it possible for delete an filter in online Excel sheet.

My files have that filter and now i cant create a table with power automate.

 

How can i resolve that? 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @frixel2,

 

It would be possible by using Office Scripts and the Run scripts action:

https://docs.microsoft.com/en-us/office/dev/scripts/overview/excel

 

Below is an example.

 

1. Create an Office Script in the Excel Online File. This should be possible via the Automate tab.

In this example I am clearing the filter from Column B in my Table1

function main(workbook: ExcelScript.Workbook)
{
  let table1 = workbook.getTable("Table1");
  // Clear filter on table table1 column B
  table1.getColumnByName("B")
    .getFilter()
    .clear();
}

officescript_removefilter.png

 

2. Add Run script action to your flow and run this script for your Excel file

runscriptaction.png

View solution in original post

3 REPLIES 3
Expiscornovus
Super User
Super User

Hi @frixel2,

 

It would be possible by using Office Scripts and the Run scripts action:

https://docs.microsoft.com/en-us/office/dev/scripts/overview/excel

 

Below is an example.

 

1. Create an Office Script in the Excel Online File. This should be possible via the Automate tab.

In this example I am clearing the filter from Column B in my Table1

function main(workbook: ExcelScript.Workbook)
{
  let table1 = workbook.getTable("Table1");
  // Clear filter on table table1 column B
  table1.getColumnByName("B")
    .getFilter()
    .clear();
}

officescript_removefilter.png

 

2. Add Run script action to your flow and run this script for your Excel file

runscriptaction.png

View solution in original post

@Expiscornovus 

Thanks for your answer, that keeps me opportunnities.

 

I have try it with the script so you tells above.

But this script is not remove the filter option from al fiels, This is a script for clear filter(s).

is it also possible for deleting the filter?

Expiscornovus
Super User
Super User

Hi @frixel2,

 

My script was just an example. You should be able to record your specific office script with the action recorder. So, I believe that would be possible.

 

Have a look at this:

https://docs.microsoft.com/en-us/office/dev/scripts/overview/excel#action-recorder

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,244)