Excel to websearch


I am very new to UIpath and for the life of me I can’t figure out why my sequence doesn’t work.

The goal is to create a Data Table with Employee Numbers, one per each row. For each number, “search” the employee number, then screen scrape all the relevant data that appears, and append to table.

I am able to create the Data Table, and I can screen scrape and append to table, but need assistance on how to pull each number from the Data Table then paste into the search.

Any assistance will be greatly appreciated.

Thank you,

1 Like

HI @Cyromar

Welcome to the community!! :smiley:

You can pull the data from the data table using a loop. Datatable is a collection of data, so we need to loop through each item to get the value out of it because we are in need of processing each one individually one after the other.

So, you can simply use a For Each Row activity to loop through the data table rows.
Within the loop, have an assign activity to assign the value in the data table to a variable so that you can use it for your searching in the web. To do that do as follows.

String EmpNumber = row(“ColumnName”).ToString
if there is no column name, use the index of the column. First column starts from zero

String EmpNumber = row(0).ToString

1 Like

you were almost done
–no worries hope these steps could help you resolve this
–use a BUILD DATATABLE ACTIVITY and create a datatable with similar columns we want to have from extracted datatable and get the output with datatable variable named Finaldt
–use a excel application scope and pass the file path as input
–inside the scope use a read range activity and get the output with a variable of type datatable named dt
–now use for each row loop and pass the above obtained dattable variable as input
–inside the loop use a open browser activity and mention the url where we want to go
–inside the open browser mention like this
row(“yourcolumnname”).ToString in the place where we want to search for employee number
–once done we can follow the same steps you have like
–use a data scrapping method and get the datatable variable named outdt
–now use a merge datatable activity and in source mention as outdt and destination mention as Finaldt
this will merge the data for each iteration

–finally we can use Finaldt to enter that into a excel using write range activity
hope this would help you
Cheers @Cyromar

1 Like