Announcements
Hi,
I have an HTMLText control, and I need to create a button which can export the contents in this control to a local txt or word or PDF file. Meaning that after the button is clicked, a "Save As" windows appears and it allows me to select the path in my computer and provide a name for me to save the file. Can anyone help on this?
Thank you in advance.
Hi @pengwei
You could launch a flow that generates the file, saves to a document library, and then returns a link to that file to your PowerApp. You could then take that link and pass it into the Launch() or Download() method in PowerApps, which would effectively download the file.
-----------------------PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
Hi @SpongYe ,
Thanks for your solution. There are a few issues.
1) after saving the file to a document library, app player doesn't have access to this. how do we set the file access such that only the current player is able to download this exact file, no other files?
2) the download and launch both opened the file in a browser tab, instead of generating a "Save As" window.
Can you please help on it? Thank you.
To download file from SharePoint library in PowerApps, you could use the Link to item column directly.
I just tested with below formula in IE:
Download(DataCardValue15.Text)
When selecting this button, the download pop-up shows and I can save the file correctly.
DataCardValue15 is the label control's name that holds the Link to item column inside the details form:
Source: https://powerusers.microsoft.com/t5/Building-Power-Apps/Downloading-a-document-in-powerapps/td-p/153058
Hope this helps.
Hi @SpongYe
I am not sure whether it's my system setting or Power Apps setting. my download always triggered a new browser tab instead of a Save As window, no matter i use Chrome or Edge.
I will keep testing it. Thank you very much for your help.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 316 Most Valuable Professional
11manish 242
Valantis 198