Hi all i am trying to iterate through a data datable and want to delete the row where it find Total record(s): 71 in table but problem is "Total record(s):45 " change evry time like the integar value after the total record change eg: "Total record(s):45, "Ttal record(s): 81 like wise i have defined a Total record in variable where variable type is string but it is not working because of the integer value after the total record pleae help to define it.! Pictures has been attached15513660503871969465602|690x388
@Saahil08 After reading values from total record use regex and take only number from the variable
Hi,
You can use for each loop and for each item use an if condition inside an for each and put a condition like if item.tostring.contains(“Total”), because total will be common in all if the numbers change ,so when the item contains Total the condition will be true and you can delete the particular row using Remove Datarow activity.
both of the solution not working. Need to iterate through the whole excel and want to delete the row who’s cell contains Total Record.
Hello @Saahil08
try like
dt = dt.select("Col1 Not like ‘Total Record%’ ").CopyToDataTable
After assigning this now again i have to use write range to copy the filtered data right.?
no need to…
you already got the datatable where no row contains the text “Total Record”.