How to loop through excel row one by one?


I need to copy/capture data from each row in excel file and pass/paste them to search field of another software in order to perform printing automation.

First, I read the first row from the excel file, copy the respective user_id1 and set it to the clipboard then paste it out to the search field. After pasting out the user_id1, the software will direct execute to the user profile 1 and I am going to print out the user profile 1. Then, I wish to perform the repeating tasks as above.

But now, I can read only one user_id from the particular excel file and the execution stopped after performing the first user_id.

Example are as below:


user_id: search_field

How do I going to loop the excel row (user_id) one by one and paste it to my search field so that I can continue with my next steps?

I looking forward to any reply. Thanks in advance.

hope these steps would help you resolve this
–use excel application scope and pass thefile path as input
–inside the scope use READ range activity and get the output with a variable of type datatable named dt
–now use FOR EACH ROW activity and pass dt as input
–inside the loop use SET TO CLIPBOARD activity andmention as row(“yourcolumnname”).ToString so that itwill set to the clipboard
–then have the same step you had to execute WITHIN THIS FOR EACH ROW loop so that it will repeat forall rows one by one

Cheers @yushinchan


Thanks for your sharing :grinning:
May I know is the FOR EACH ROW need to execute inside DO scope or EXCEL APPLICATION scope?

inside do container of excel application scope
Cheers @yushinchan

1 Like

Kindly let know for any queries or clarification
Cheers @yushinchan

Alright sure. Thanks so much :+1:

1 Like (17.1 KB)

@yushinchan, I have attached one sample workflow based on your requirement…Please mark this as Solved , if your requirement met.


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