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.
I have completed this much of the workflow
Now I have to define processes for then block
but I am very much confused on
how to copy the row.
You need not use loop…
Instead use a filter datatable and use the output datatable to write back the row to excel…if excel already exists then use append range
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.
Was just getting ready to reply the same, that is the fix!