i have an Excel containing several column. i want to remove rows based on some 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.
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.
Use activity ‘Filter Data Table’ with the condition as below,
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
February 25, 2023, 5:03am
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.