Loops through Columns to fill-out form

I have an Excel sheet with 3 columns.

Form Information Person 1 Person 2
Name Bob Dan
Address NY NJ

I have a form that has a Name field and an Address field.

I want the robot to fill out the form for Bob and Dan, respectively.

How can I have the robot do this? I want to use a For Each Column method because the Excel file format cannot be changed.

Thanks in advance!

Use For Each item in DataTable.columns.

Thanks for the quick reply.

However, it’s not typing anything into the form.

Just give them in writeline and check the output.

Please use data table for each loop …I have explained about it in the below tutorial

Please follow the steps below
1.use excel application scope(indicate/input your excel)
2.use read range inside your excel application scope(specify sheet name and the output data table name)
3.now you have your data table example dtOut
4.now use for each row of your dtOut
5.use typeinto (indicate name and address one for each) inside your for each and use row.item(1). ToString for name and row.item(2). ToString for address

1 Like