Use the date of 3 columns of excel combination with for each loops


I have 3 columns of excel with date.

First columns is the plate number of the car of the company
Second columns is the driver
Third the date that he drives.

With the first column I can open a screen for that car
Then I have to past the information of the second and third column in that screen.

I try to do that with a loop for each element of column A. I have the date of the column B&C in a variable list. But If I try to add in each loop to enter keystrokes and then select the variable I need to select the Index. But this index is a number.
How I can put a formula here, take the number in the same position as the number of loops executed. Or the same position as the plate number that was using in this case?


Hi Joel,
Typically how I do this is use the ‘Get Column’ action to write each of the three columns to a separate list variable (i.e. plate_number, driver, and drive_date). Then I create a Number type variable called ‘counter’ or something similar and use a Constant value action to set it equal to 1. Then I begin a ‘for each’ loop on the plate_number list, and get the corresponding indexed values from the other lists using ${driver[counter]} and ${drive_date[counter]}. At the end of each iteration of the loop, I use the Expression action to iterate the counter variable so that the next time through the loop it will grab the next indexed value.

-Ethan Morris
RPath RPA Manager

1 Like