Hello guys,
i have an Excel containing several column. i want to remove rows based on some condition.
Condition:
I want to check for “40 - Engineering” in CLASS CODE AND DESC COLUMN if it is
Then it should look for “4004- Contarctors All risk” in PRODUCT CIDE AND DESC column if it is
Then it should look for “Etokio” in Interface column.
If all the condition are satisfied it should remove that rows in the excel.
So is there any solution for this.
Hi @Gokul_Murali
Use the following query:
dt.AsEnumerable.Skipwhile(Function(row) row(" CLASS CODE AND DESC COLUMN").ToString.equals(“40 - Engineering”) AND row(“PRODUCT CIDE AND DESC”).ToString.equals(“4004- Contarctors All risk”) AND row(“Interface”).ToString.equals(“Etokio”)).CopyToDataTable
This skips the rows which meets the specified conditions.
Best Regards.
Hi @Gokul_Murali ,
Use activity ‘Filter Data Table’ with the condition as below,
Best regards
1 Like
HI @Gokul_Murali
You can achieve this using Filter datatable activity also
after getting the filter what you need to do is you can write the filterd dt in the new excel sheet if you want to remove from the existing sheet
You have main dt Right
With that you need to the delete the range from A2 : Last column and last row
then write the filtered dt in that sheet
Regards
Sudharsan
system
(system)
Closed
February 25, 2023, 5:03am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.