Read each row from excel,In dropdown value it has to select that option ) please anyone help me

Hi Masters,

My excel file contains City names, While doing data scraping it has to select that city name in the dropdown boxes,and paste that result in the excel file. How to loop reading excel values using variables. Pls can any one provide example xaml file , it will be a great helpful to me.

If you provide a sample excel file with dummy data I’d take a crack at it, but I’m not going to go through and create an approximation of your template as that’d take too much time


Use Read range activity to read the excel sheet and store it in a DataTable dta

Now let us take list of strings List A which contains City names of the excel sheet.

List A=(From p in dta.Select
          Select Convert.ToString(p.Item("City Column Name"))).ToList

Now use For Each Activity for List A

Inside ForEach Use Select Item Activity to select the city in Dropdown.

Then Use DataScraping Activity to Scrap the Structured Data and store it in a datatable.

After that you can write in an Excel sheet.


Mahesh i need to select city name, county, destination name, street address from column c, v, u and i respectively. I want to keep all this in variable after that i will go to some website then these all items i need to select in website then click on search, the result i need to store in excel, my source excel file contains 400000 rows in excel,.
In the above mentioned what does p refering to i didn’t nt understand the code, pls can any one explain cleary, looping these many columns if any one provide any xaml example really it will be very appreciable, pls help me on this, due to few security reasons i cant even attach dummy data

I gave it a shot. It’s very difficult to help out with such limited info. Note that I didn’t test this because a lot of the data doesn’t make sense (i.e. no such website as

This workflow opens the browser to your webpage, reads the initial excel file, then iterates through every row in excel using a for each loop. In the loop, it is using the excel file to select the correct item from the dropdown box on your website, grabs the results, and writes it to back to your excel file.

Hopefully this helps you get started.
Main.xaml (15.5 KB)
Book1.xlsx (8.2 KB)

1 Like

Thank you so much Dave, it is unbelievable , really you xaml file will solve my problem . Just 1 small question in the above xaml file in read reange activity you have selected A1:A2 ,please just can you explain what does it refer to .

Sorry, I didn’t mean to reference that range. You should leave it blank instead so it will copy the entire worksheet to the data table instead of just that range

1 Like