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 Apps / How to Download Excel ...
Power Apps
Unanswered

How to Download Excel file from OneDrive to my local device(desktop/laptop) through PowerApps?

(0) ShareShare
ReportReport
Posted on by 8

I have one requirement to Download Excel file from my OneDrive to my local device (desktop/laptop). I have got Excel file's web url from PowerAutomate and passed it to PowerApps and then using Download(link_of_excel_file) function in PowerApps I tried to download it. But the file is opening in Browser instead of getting downloaded. 

Is there any function for downloading any web file to local system in PowerApps or even if  is it possible through Power Automate?

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @nivD2021 

    There is nothing that will interact with local storage in PowerApps.  

    The Download function will, in fact, download a file as requested, but it is up to the browser to determine how to handle it.  Your browser understands to open the file in the browser and not prompt for a "save" option.  If the browser does not know how to handle a file, it will prompt to save/download it locally. 

    But, if you are looking for Powerapps to bring up a folder chooser or something, it will not do that.  It is completely reliant on the browser to handle files.

     

    I hope this is helpful for you.

  • nivD2021 Profile Picture
    8 on at

    Thanks @RandyHayes . Would you please tell what should be the Browser settings for that? I am using latest Edge browser and it has settings for Downloads as below image

    nivD2021_0-1629398069547.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @nivD2021 

    Yes, so the browser is still going to "ask" the local registry how to handle the file and it is also going to be highly dependent (if at all) on the parameter you are passing to Download.

    What is your formula for the Download?

  • nivD2021 Profile Picture
    8 on at

    In Flow (MyFlow) of Power Automate added steps - 1.Create Share Link and 2. Respond to a Power App or Flow(in this step added Output Parameter as ExcelFileLink)

    Then in Power Apps used the Formula in OnSelect property of one Button as :

    Set(varLink, MyFlow.Run().excelfilelink);Download(varLink);

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @nivD2021 

    That will not force a download.

    You need to access the Download.aspx page on the site and then pass the source url to it.

     

    So for example, if your document was on a site called "stuff" and your file was in the document library called "Documents" and was called "myExcel.xlsx"

    Then your Download (or really, Launch is what you want) should be going to:

       https://yourorg.sharepoint.com/sites/stuff/_layouts/15/download.aspx?SourceUrl=https://yourorg.sharepoint.com/sites/stuff/Documents/myExcel.xlsx 

     

    This will force a download.

     

    So, if your flow is returning the full url to the file, then:

    Launch("https://yourorg.sharepoint.com/sites/stuff/_layouts/15/download.aspx?SourceUrl=" & varLink)

     

     

     

     

  • nivD2021 Profile Picture
    8 on at

    Thanks for your reply. Actually not having such Sharepoint sites so I didnot understand how to implement your solution. Excel files are present in OneDrive. Hence I tried by appending "?download=1" after the URL. But in all browsers it is showing that Pop-ups blocked to redirect the url. If I copy and paste the whole url in a new tab it is downloading smoothly in local system.

    The url in my case coming back from Flow is: "https://myorg-my.sharepoint.com/:x/g/personal/my_name_org_name/IdOfFile"

    Then the function in PowerApps is : "https://myorg-my.sharepoint.com/:x/g/personal/my_name_org_name/IdOfFile?download=1"

    Also, clicking on the popup it has 2 radio buttons -

    1. Always allow pop-ups and redirects from https://apps.powerapps.com

    2. Continue blocking

    where Continue blocking is by default selected and I am not able to select allow button.

    Requirement is that user will not also explicitly allow that popup in browser.

    Please help.

  • nivD2021 Profile Picture
    8 on at

    @RandyHayes 

    Thanks for your reply. Actually not having such Sharepoint sites so I didnot understand how to implement your solution. Excel files are present in OneDrive. Hence I tried by appending "?download=1" after the URL. But in all browsers it is showing that Pop-ups blocked to redirect the url. If I copy and paste the whole url in a new tab it is downloading smoothly in local system.

    The url in my case coming back from Flow is: "https://myorg-my.sharepoint.com/:x/g/personal/my_name_org_name/IdOfFile"

    Then the function in PowerApps is : "https://myorg-my.sharepoint.com/:x/g/personal/my_name_org_name/IdOfFile?download=1"

    Also, clicking on the popup it has 2 radio buttons -

    1. Always allow pop-ups and redirects from https://apps.powerapps.com

    2. Continue blocking

    where Continue blocking is by default selected and I am not able to select allow button.

    Requirement is that user will not also explicitly allow that popup in browser.

  • jaindivyanshi Profile Picture
    2 on at

    .

  • DBTS7 Profile Picture
    on at

    Hi @nivD2021 ,

    I'm also facing the same issue, I would like to know if you are able to download the excel file from Powerapps? If yes, can you please explain, how?

    I can generate the one-drive link in which excel sheet will open when user click button in powerapps, but I want to download the excel file directly in my local.

    Thanks.

  • xanderTwiga Profile Picture
    4 on at

    @DBTS7  @nivD2021 

     

    Get the onedrive sharelink from power automate onedrive connector and append ?download=1 to the sharelink weburl worked for me.

    @nivD2021  in your case 

    instead of   -    Set(varLink, MyFlow.Run().excelfilelink);Download(varLink);

    use - Set(varLink, MyFlow.Run().excelfilelink);Launch(varLink&"?download=1");

     

     

    hope it helps!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard