cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
venka91
Super User
Super User

Download File from SP document library

Dear All,

 

I have a excel file in SharePoint document library. I want users to download the file, modify the updates and send as an email from their mail box.

When use the download function, the excel sheet directly opening with excel online and allows to edit.

Instead I just need the users to download the file on their local machine, and then edit. I am testing this with Edge browser.

 

can any one please help ?

10 REPLIES 10

Hi @venka91 

 

You can use Download function to achieve your needs. 

 

Also refer to this thread with similar requirement: https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApps-Download-file-button/td-p/8491

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-albai-msft
Community Support
Community Support

Hi @venka91 ,

Which Link are you providing inside the Download function? I assume you got the link from the following. This shared link is used for people to edit online:

v-albai-msft_0-1611211420561.png

To download an Excel file from SP document library, you could set the OnSelect property of the download button as below(replace your own data with the underlined positions): 

Download("https://<site URL>/_layouts/download.aspx?SourceUrl=/sites/sitename/libraryname/filename.xlsx")

For example, below is the formula I used in my download button:

Download("https://<site URL>/_layouts/download.aspx?SourceUrl=/sites/<sitename>/<libraryname>/Activity.xlsx")

Best Regards,

Allen

Hi there, no i am not able to get the correct link to work .

Example : my list stored in the below location.

https://mysharepoint.com/IT/Onboarding_Bulks/Forms/AllItems.aspx 

How should I be giving the URL now ? what ever i tried it says file not found.

Hi  @venka91,

From the URL you provided, it seems that this is a subsite under the default site collection. The formula I provided in my last reply applies to the custom site collection. For default site collection, you need to make a small change(just remove "/sites").

So this time, try below formula(remember to change the name of your file):

Download("https://mysharepoint.com/IT/_layouts/download.aspx?SourceUrl=/IT/Onboarding_Bulks/E-mail_Requistion..xlsx")

Best regards,

Allen

Hi @venka91 ,

How are things going? Have you solved your issue?

If my solution is helpful to you, please mark my answer. This will benefit other community members who stuck with the same question.

Best regards,

Allen

Unfortunately i am not able to solve this yet. When i tried your suggestion, i got a message, the page cannot be located.

Hi @venka91 ,

So strange, I have tested in my site and everything works well. 

Is "IT" your site name? Please provide the formula you used in Download().

You can compare my formula with yours:

My site name is "testericm", my library name is "library1":

v-albai-msft_0-1611827926092.png

I use this formula(if your directly use below URL in browser, you can also download the Excel file):

Download("https://mysharepoint.com/testericm/_layouts/download.aspx?SourceUrl=/testericm/library1/E-mail_Requistion_test20210128.xlsx")

Best regards,

Allen

 

gwwarner34
New Member

Can you show and example where you show the document link (from the copy link option) and then show how that relates to the Download("") function?

This worked for me! It was a bit tricky to align everything, but at the end the button triggers a download rather than opening the file.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,900)