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 / Seeking Guidance on Se...
Power Apps
Suggested Answer

Seeking Guidance on Securely Refreshing and Notifying for a Locked .xlsm File on SharePoint

(0) ShareShare
ReportReport
Posted on by 19

Hello everyone

We are working with a locked .xlsm file on SharePoint that contains Power Query. Users can refresh data via a button but cannot view or edit the code. We want to automate the refresh using Power Automate on a schedule, send users a notification once the data updates, and ensure the Power Query code remains protected. All related files are stored in the same SharePoint folder. We need guidance on:


     
  1. Whether Power Automate can refresh a locked .xlsm file and notify users,

  2. How to keep the Power Query code secure,

  3. Best practices for securely automating Power Query workflows on SharePoint.
Any guidance, suggestions, or examples from your experience would be greatly appreciated. Thank you in advance for your help!
 
Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,613 Super User 2026 Season 1 on at
    It is trivial to crack the password of the XLSM file.  What is so valuable in your Power Query code? Hard coded credentials with too much scope?
  • Suggested answer
    WarrenBelz Profile Picture
    154,473 Most Valuable Professional on at
    Responding as no one else has - the below is from a couple of queries I did and may be useful - suggests you move the query out of Excel into a Power BI Data Flow as below

    Go to Power BI Service
    • Workspace → New → Dataflow
    • Choose SharePoint Folder (or whatever source you use)
    • Recreate your Power Query logic here (copy code from Excel directly)
    • Save the dataflow
    In the dataflow:
    • Set Scheduled refresh and frequency
    • Configure credentials
    • Create a new Excel file (.xlsx) and add to the Dataflow
    • Load tables
    In SharePoint
    • Grant users appropriate access
    • Disable Download and Open in desktop 
    It seems logical to me, but I have not attempted it.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    154,473 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard