Read Excel, put columns as argument one by one into browser

excel
activities

#1

Hello! Here’s one rookie who just signed in into forum and who has been watching UIPath videos in youtube in past few days and I am VERY impressed.

OK, straight into the problem/challenge I have. I would like to do the following:

  1. Excel includes many urls in let’s say column B.
  2. I want to pass them to browser one by one and browser examines information about the url
  3. Some information like owner of the domain is collected and returned back to Excel
  4. Returned data is written into correct row of Excel so that it corresponds the url

Basically I dont need and dont want to have complete solution and project for this, but instead tips would be great!

This far I am able to read my Excel and print in pop-up, but I havent been able to pass rows(columns) one by one for browser.

Thanks in advance! Cheers.


#2

Props for not asking for the direct answer - makes me far more willing to help you :slight_smile: @ovi take note I am sometimes nice!!

Let’s talk through the logic to get you started…

  1. Read the Excel file into a datatable - one of your columns will be called “URL”
  2. Loop through the datatable using the For Each Row activity and assign the URL for each particular row by doing this :
    myCurrentURL = row(“URL”).ToString
  3. Take the myCurrentURL value and enter it into the web browser (and do the other things you would like to do)
  4. Collect the additional information by using get text activities (or screen scraping if needed) - use IE if you can.
  5. Still within the for each take the extracted information and set it to the row e.g. if you had extracted domain name:
    row(“Domain Name”) = myDomainName - where myDomainName is the value extracted from the web page.

Note, at some point you will need to add new data columns or create a brand new data table.

Hope this gets you started - shout if you get stuck. Also there are plenty of useful articles on the forum.

RD


#3

Hey Richard, I’ve noted this one in my calendar :joy:

But the request is also pertinent so gg @forest81. Please note that you can also register for free on the UiPath Academy, you’ll find a lot of useful courses.


#4

Hi Richard and sorry for delay, it’s been a busy week (once again). Thanks for tips! Once I’ll have time, I will try to get further with my problem, that’s for sure. I will let you know if I face challenges again.

@ovi, good to know that academy is free! I will have tour there, too.


#5

Hi, now I need to ask further advise:

  1. how do I define the scope of the Excel? I mean I wouldn’t like to define the range in Read Range because if this robot becomes re-usable, the amount of domains/urls in Excel varies each time. My concern is that all I want to put into DataTable are the domains, not the header “URL” which stands in B1 and nor the header in C1 and D1 which are the headers for result columns.

  2. I am able to read the contents of Excel, but how do I tell the For each row component to pick one domain at the time? Output data table input is DT1 and output is variable myCurrentURL.


#6

Hi,

  1. You can leave the Range unspecified and it will read all the sheet. https://activities.uipath.com/docs/read-range

  2. Here is an example: test.xaml (17.5 KB)
    It was a similar request in another post(i can’t find it now) to go to a website, scrape all the results(including URL). Then, go to each URL and extract a date and put it in another column of the datatable.
    Please check it out.