Need To Remove Rows Based On Condition

Hi,

If data contains X then we need to remove that particular row. Attached snapshot.

image

Thanks,
Rishi

@Putta_Sri_Sai_Rishik_Chow

Read the data into datatble…then use the below in assign activity

Dt = dt.AsEnumerable.Where(function(x) Not x("Number").ToString.ToLower.Contains("x")).CopyToDataTable

Then write the dt back to excel

Cheers

Hi @Putta_Sri_Sai_Rishik_Chow ,

Check this below linq,

dt_filtered = (From x In dt_Input
Where Not(x("Number").ToString.Trim.ToLower.Contains("x"))
Select x).CopyToDatatable()

Hope this might help you :slight_smile:

Hi @Putta_Sri_Sai_Rishik_Chow

Also you can use filter datatable activity

try this also

Thanks

@Putta_Sri_Sai_Rishik_Chow

image

Hope this helps,
Cheers.

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