Filter excel table to remove particular rows

Hi All,
I want to filter excel table using filter table activity but my condition is I have to remove rows which starts with particular string.

check in filter data table activity there you can find options keep or remove so use remove option in your case

We don’t have any. PFB the screenshot for the same.

@rishabh.jain

Do you want to delete rows from Table or DataTable ?

Hi @lakshman,
I want to delete from Excel Table.

Hi @rishabh.jain,

you can save the data to DATA TABLE afterthat by using filter data table you can remove the particular row by assigning the row value. like below.
image

Regards,
Suresh.

Hi @rishabh.jain,

I’ll suggest you to use Filter DataTable activity as shown in below shot,

image

  1. Input DataTable —> datatable variable (Output variable of read range activity)
  2. Output DataTable —> datatable variable (it should be same, if want to store filtered datatable to be stored in same variable Or else you can create a new datatable variable)
  3. Check Remove radio button of Rows filtering mode.
  4. Specify column name in double quotes.
  5. Select Starts With operation from the drop-down.
  6. Set string value in double quotes —> EX. “A” , if you want to remove rows which starts with A.

That’s it.
Now you’ll get a filtered dataTable having no rows starts with specified string.

@suresh_kumar4 thanks for the suggestion but I was trying to do directly into excel instead of uipath

@samir thanks for the suggestion but i was trying to do it in uipath

yeah dude @rishabh.jain , The activity Filter DataTable I was talking about is from UiPath.
The screen-shot & description is to give you an idea about how you can set the parameters of that activity, to get filtered datatable.
And once you have filtered dataTable, then you can write that data into excel using Write Range activity (From UiPath itself).

@samir
sorry my bad :smile: . I mean to say directly in excel via uipath by using filter table activity and not filter datatable activity

Okay :smile: for that

  1. take Filter Table activity Excel Application Scope and set the workbook path.
  2. Set all the parameters like sheetName, ColumnName and table name. as shown in below shot.

image
for the table name, first you have to create table in excel and pass that table name in activity parameter

  1. Set the FilterOptions —> {“S*”}
    here S is just an example, so it’ll filter table on rows whose values starts with S.

I hope this’ll help you. @rishabh.jain :blush:

@samir, Thanks a lot for putting this much efforts. It’s appreciable :slightly_smiling_face:.
But instead of retaining rows having a column value starting from S, I want to remove them. Please see if you can help me out in this.

Hey, Did you solve this? I am stuck in same thing. I want to deselect column data and then remove.

Hey Samir can you guide me through… I want to deselect some field from column A. and then remove. By using filter table activity in excel