web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Downloading excel file...
Power Automate
Answered

Downloading excel file from website

(0) ShareShare
ReportReport
Posted on by 8

I have been trying to automate downloading excel files from a website. Here is an example:

https://wits.worldbank.org/trade/comtrade/en/country/GBR/year/2022/tradeflow/Imports/partner/ALL/pro...

 

I am looking at particular trade codes (not all of them) to create a data visualisation. 

 

When inspecting the ui elements, where you click to download the excel file (a small icon on the right hand side) it shows as a png. 

I initially tried to build the flow as shown in the attached picture but it is not helpful in this situation. 

Does anyone know how I might approach this so I can download the excel files without having to it manually? I am using power automate desktop. 

Screenshot 2024-03-11 at 00.31.53.png
I have the same question (0)
  • Verified answer
    Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Predinkpo 

    Please follow the below suggested flow:

    1. Launch Chrome and Navigate to the Website:

    2. Use Click link on web page 

      • Locate and click on the 'Download Excel Sheet' image/button on the webpage as like below.Deenuji_2-1710165691529.png

         

        and make sure the below flag is turned on in the chrome browser

    Deenuji_3-1710165768564.png

      • After downloading your chrome would ask to save your fileDeenuji_4-1710165897216.png

        Then using "Populate text filed in window" capture your dialog text box and you keep your filename as per your wish example I mentioned "productcode_12345" and use press button on window action and save your file

      • Deenuji_5-1710166038754.png

         

        Full code

    Deenuji_0-1710165089078.png

    And also you can turn on you recorder and do your activities it will generate the equaling actions.

     

    Code:
    @@source: 'Recorder'
    WebAutomation.LaunchChrome.AttachToChromeByUrl TabUrl: 'https://wits.worldbank.org/trade/comtrade/en/country/GBR/year/2022/tradeflow/Imports/partner/ALL/product/540720#' AttachTimeout: 10 BrowserInstance=> Browser
    @@source: 'Recorder'
    WebAutomation.Click.Click BrowserInstance: Browser Control: appmask['Web Page \'h ... ct/540720#\'']['Image \'Download Excel Sheet\''] ClickType: WebAutomation.ClickType.LeftClick MouseClick: True
    @@source: 'Recorder'
    UIAutomation.PopulateTextField.PopulateTextField TextField: appmask['Pane \'United Kingdom ... - Google Chrome\'']['Edit \'File name:\''] Text: 'ProductCode_12345' Mode: UIAutomation.PopulateTextMode.Replace ClickType: UIAutomation.PopulateMouseClickType.SingleClick
    UIAutomation.PressButton Button: appmask['Pane \'United Kingdom ... - Google Chrome\'']['Button \'Save\''] Simulate: False

     


    Thanks,
    Deenuji Loganathan
    🤖 Automation Evangelist
    Deenuji - Follow me on LinkedIn

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🌟

  • Predinkpo Profile Picture
    8 on at

    Thank you @Deenuji . This worked perfectly. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 589

#3
Haque Profile Picture

Haque 522

Last 30 days Overall leaderboard