Delete multiple rows in a excel or datatable using indexes(several)

Can any1 help me in how to delete the multiple rows from a [excel](using several indexes

I mean i wants to delete row 1, 4, 5, 8, etc, these indexes are random

Like when i delete the row at index 1, remaining indexes of a excell get decremented and shifts back, so can any1 assist me in deleting the rows in a single statement

1 Like use Insert/Delete Rows activity and pass the position as your index and after each operation decrement your position (next index by deletedcounter) e.g. 1,4,5 index you have to remove then you need to 1,3 and 3 respectively


For this you can use with “Filter data table activity” with Filter Rows (Remove)

or can you please try this post can help you.



To delete the contiguous row use this activity.

bring 1, 4, 5, 8 into an array of int {1,4,5,8} e.g.arrDelIndex
you can reverse with arrDelIndex.Reverse() or just init in reversed order
in case of many unordered values we just do a sorting DESC

with a for each it can be iterated over the arrDelIndex
each item from the loop is the index twhich is to use w.g. delete Datat row activitiy

As we do the deletion from higher index to lower index so deletion is not confused as the lower indexes are still valid

1 Like

I have done this, it works

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