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 Automate / Closing Excel File to ...
Power Automate
Unanswered

Closing Excel File to Key to Unlocking to Update Properties?

(0) ShareShare
ReportReport
Posted on by

My Power Automate program reads rows from an Excel file in a SharePoint document library and then tries to update a metadata field in that document library item, but it fails every time with a "file locked" message. I suspect that my Power Automate program has locked the file when reading the content and this is why it's locked. Who knows, it's just a theory. Should I be somehow closing the Excel file and then pausing for the lock to clear? How would I close the Excel file? Is there a way to pause until a lock clears? Or will doing anything with the Excel file just cause it to be locked, and any attempt to pause would be futile because it's the PA program itself keeping the lock going? How do we do this in the modern age?

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @JFC_PAS 

    I know this won't be a popular answer, but my first suggestion is don't use Excel.  The problem that you have described is the primary reason not to use Excel with Power Automate for anything other than a read only scenario.  You might consider storing the data in a SharePoint list rather than Excel.  Those that want to use Excel can link to the list.

    I can show you a way to go into a loop that will keep looping until the lock is gone.  This typically takes at least 5  minutes.  Let me know if you want an example of the loop.

     

     

  • JB-26112252-0 Profile Picture
    on at

    Thank you for the response. Your advice is sound and echoed by others I've consulted. Unfortunately, the reality is that the workbook is part of the corporate culture and until I can convince my management to invest the resources to stand up something to replace it, and then convince a division full of people to use it, I'm stuck with having to read their workbook for now. I'm reporting out results in an alternate way (no longer updating the document metadata) which is holding up OK for the moment.  I've heard of "the loop" and may have to go there at some point. I do appreciate your response. Thanks!

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

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard