How to filter fields in excels excluding few values using uipath using excel activities

I have an excel file where I should exclude few countries and select the rest of them from the list.

List has repeated country names. we have to exclude 11 country names out of so many(Total number of countries changes).

Hi @Sneha_1992

You can use the Filter activity which is the Excel activity.

Hope it helps!!

I will have to exclude the values

Then you have to use Filter Datatable activity it is not the excel activity it is datatable activity.
Read the excel and store in a datatable and use filters after that you can write the output datatable to same excel.

For this activity we have a option to remove the matched rows with the list of countries.

Or we can write linq expression.

Or

You want to do it with only excel activities, then we have to use For each excel row activity to iterate each row and then use If activity to check the condition and by using delete rows activity we can delete the particular row.

Hope you understand!!

any idea on macro so that I need not use any data table. because after excluding the list I have multiple filters and changing the font color to red which cannot be done in datatable

Yes that is also possible with macros by using vb code. We have an activity called Invoke Vba activity which helps you to execute macros in the excel itself, no need of changing datatable and all… @Sneha_1992
image

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.