I have one Excel file which looks like the one given below.
I have to take input from a user if the name entered by the user matches the name in the excel names it should copy the entire row for that and paste it into a new sheet2 of the file.
You can use “Add data row” activity to add that row to a new datatable Dt2 (by passing the value “row”):
and then (outside your for each), using write range, paste that datatable Dt2 into a new sheet.
now the trick here is that you might find multiple matches to the name you are searching for, in that case your datatable will have more than one row.