Hi,
I want to remove multiple rows from a data table. For example lets say I am having datatable DT1 and I have to remove 2nd, 4th and 5th row from it. Could anyone please advise what’s the best way to achieve same.
Thanks,
Kapil
Hi,
I want to remove multiple rows from a data table. For example lets say I am having datatable DT1 and I have to remove 2nd, 4th and 5th row from it. Could anyone please advise what’s the best way to achieve same.
Thanks,
Kapil
Hi Kapil,
Are you checking for any condition in the row value and then removing the rows or directly you will decide on from which index the row should be deleted?
If its based on condition, (variables are specified in bold)
If you don’t need to apply and conditions and just want to remove from the known indexes,
Use Remove data row activity and in properties specify Datatable as DT1, RowIndex as index from your list.
Hope this helps!
For Row indexes actually this does not work in my observance, because as you delete the rows, each row index in target DataTable lags/shifts upwards. Index 3 is no longer the Index 3 in the DataTable, if you remove one row.
you have to reverse the loop and start deleting the last item first.
hi @Kapil
please find the attachement and book1.xlsx is my excel attach yours…
BlankProcess1.zip (9.9 KB)