cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

From Excel Column URL to opening sites

Hi - I am trying to open /click rows in an excel with URL link. I need to extract that data once the URL is open pasting it back to to the corresponding row. Anyone has done something similar?

1 ACCEPTED SOLUTION

Accepted Solutions
fraenK
Memorable Member
Memorable Member

You need to open Excel with your file, read its content, oprn a browser, loop through each row?, open the cell value as URL in a browser, extract your data and write it back to Excel to a named or numbered cell

https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-type...

https://docs.microsoft.com/en-us/power-automate/desktop-flows/automation-web

View solution in original post

15 REPLIES 15
fraenK
Memorable Member
Memorable Member

You need to open Excel with your file, read its content, oprn a browser, loop through each row?, open the cell value as URL in a browser, extract your data and write it back to Excel to a named or numbered cell

https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-type...

https://docs.microsoft.com/en-us/power-automate/desktop-flows/automation-web

Hey, is there any more possible information on how to solve this. I have read through links provided by fraenK and I am still struggling to complete the same job as Anons post. Working through a list of URLs within excel, extracting info from selected URL and writing data onto the next column (Looping through each row intillfinish). Any simple guided templates would be greatly appreciated.

Assuming you are doing this in chrome:

 

  • Open Excel
  • Get Last Row
  • Get Exceldata (to last row)
  • For Each %CurrentItem% in ExcelData #Current Item = Row in this case
    • Read %URL%
      • If %CurrentItem.Index% (or .Row - not sure) = 1, Launch Chrome to %URL%
      • Else
        • Focus Chrome Window
        • Send Keys {Control}(l) #that's a lowercase L - this will take you to the address bar
        • Send Keys %URL%{Enter}
      • EndIF
    • Do your tasks to find your info
    • Write to Excel
  • End #For Each

Best of luck!

Thank you so much! I'll make sure to update you when I have it working

 

An Error is thrown on action 9 (Focus window) Window instance must be an integer value? 

InkedLink Scrape TEMPLATE_LI.jpg

Anonymous
Not applicable

Hello @DarkinArch 

 

Here is working example of desktop flow.

 

Excel.LaunchAndOpen Path: $'''C:\\Users\\User01\\Documents\\Open URL to Get Infor from Web.xlsx''' Visible: True ReadOnly: False LoadAddInsAndMacros: False Instance=> ExcelInstance
Excel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
SET RowIndex TO 2
LOOP FOREACH CurrentItem IN ExcelData
    WebAutomation.LaunchEdge Url: CurrentItem['URL'] WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False Timeout: 60 BrowserInstance=> Browser
    WAIT 2
    WebAutomation.DataExtraction.GetDetailsOfElement BrowserInstance: Browser Control: appmask['Web Page \'h ... nd-august/\'']['Author and Publish Date'] AttributeName: $'''Own Text''' AttributeValue=> AttributeValue
    WebAutomation.CloseWebBrowser BrowserInstance: Browser
    Excel.WriteCell Instance: ExcelInstance Value: AttributeValue Column: 3 Row: RowIndex
    Variables.IncreaseVariable Value: RowIndex IncrementValue: 1 IncreasedValue=> RowIndex
END
Excel.CloseAndSave Instance: ExcelInstance

 

shindomo_0-1632310085882.png

 

shindomo_1-1632310121373.png

 

Thank you.

Fantastic!  Works perfectly Thank you!

Could be even faster if you move the "Launch new Microsoft edge" up before the for each
The use "Go to webpage"  inside the "For each" loop
Then when the loop finish, close the web browser.

In that way you don't have to start and close the web browser all the time.

Anonymous
Not applicable

Hello @Highboy 

 

You are right. Thanks for your advice. 😊

@Highboy  do you know how can I complete this flow by using extracting data from webpage instead of get details of element on web page

Highboy
Super User
Super User

Not quite sure what you are asking for.

@Highboy Thanks for your quick reply. 
I have an Excel file with the following URL's 

Powerlearnerd_0-1664537545275.png

I want to open each of these websites and then webscrape multiple items on the pages.

E.g. contact details for multiple dealers.

 

Many thanks in advance

Powerlearnerd
Frequent Visitor

Hi @Highboy , do you might have an idea on this.

 

Kind regards

 

Powerlearnerd

Highboy
Super User
Super User

A quick solution would be something like this

Highboy_0-1664961654780.png

 

@Highboy hello high boy,

i am having issues with following this. Attaching the issue and my doc here. thanks for much in advance for your help.!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Top Kudoed Authors
Users online (3,593)