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 / Export HTMLText to a l...
Power Apps
Answered

Export HTMLText to a local file

(0) ShareShare
ReportReport
Posted on by 139

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?

 

pengwei_0-1695733847115.png

 

 

Thank you in advance.

Categories:
I have the same question (0)
  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 1 on at

    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! 🍻

  • pengwei Profile Picture
    139 on at

    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.

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 1 on at

    Hi @pengwei 

     

    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:

    SpongYe_0-1695738377826.png

    Source: https://powerusers.microsoft.com/t5/Building-Power-Apps/Downloading-a-document-in-powerapps/td-p/153058

     

    Hope this helps.

    -----------------------
    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! 🍻

  • pengwei Profile Picture
    139 on at

    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.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard