Puling data from excel sheet to selecting field

Is there a way to pull data (expired month and year) from excel and then insert it to drop down field ?


Use read range to read the data into datatble…

Now use for each row in datatable and then read the data for each row

From the selctor we can make it dynamic and pss the values into it


How to handle and pull the data from Excel I know
Can you explain more detail what you mean “From the selctor we can make it dynamic and pss the values into it” ?

Hey @mironb

Step 1: Read the excel sheet & save the output data table in dt_data.
Step 2: Take a ForEach loop, which iterates through each ‘row’ in dt_data.
Step 3: Create 2 variables before entering the loop - expMonth & expYear (Both of type String)
Step 4: Inside the loop, assign expMonth=row(“ExpMonth”).ToString & expYear=row(“ExpYear”).ToString.
Step 5: Since you have the expiry month & year variables now, you can use the ‘Click Text’ action on the respective dropdowns by providing their Ui Region.

Hope you find this helpful :slight_smile:

Step 5 : you mean “click OCR text” ?
I can’t see “click text” activity
Thanks for the detailed explanation.


There is an activity called ‘Click Text’ included in the ‘UiPath.UiAutomation.Activities’ package. Make sure you have installed the same.


I got error in step 4

Hey @mironb , Sorry that there was a slight syntax error in Step 4. I’ve updated the same.
Take assign expMonth=row(“ExpMonth”).ToString & expYear=row(“ExpYear”).ToString

Also, Use ForEach ‘row’ in dt_data.

The same.
Maybe because its (expMonth) a column ?

@mironb , as I already mentioned that you need to create ForEach ‘row’ in order to get this done. Please find the image.



This might help you


Ok - And this I placed inside the “DO” of the “For each excel row” ?

@mironb , Yes. It’s just a sequence inside the loop.

Sorry I drive you crazy - but there is no item I can use and dt_data
its insert me currentitem