web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Check if file is open

(0) ShareShare
ReportReport
Posted on by 2,157

Is there a way to check if an excel file in one drive is open so that I can delay a flow until it is closed and ready to use?

Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    @leyburn19 a flow can run even if the Excel file in OneDrive is open. I quite often have an Excel file open of monthly changes to a SharePoint site while a flow is running which deletes the current rows and then populates the spreadsheet with the new data. I find it quite fun to watch the rows disappearing and re-appearing in real time (but then I'v very old and little things like this amuse me).

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • leyburn19 Profile Picture
    2,157 on at

    Thanks Rob,

     

    That would be fine if I was controlling sequential access,  but in this case I am not.  It is feasible (but rare) that one of my sites will start the process and another site do it at exactly the same time which means adding rows over the top or to the other. Each site (all 29) must end up with an independent outcome.  The process at its longest would take 20 minutes. I am actually thinking of two solutions at the moment.

     

    1. Build a simple delay of 20 minutes at the beginning,  but this can meet the same issue

    2. Have 29 separate sheets which are access by a switch.  Not sure a switch can do 29 cases.

     

    Oh! Modified old saying - Age shall not weary them BUT the years sure do condemn.  (I fit the age bracket too)

  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    @leyburn19 🙂 Last time I looked a switch could have 27 cases. Just short of what you need.

    Rob
    Los Gallardos

  • Community Power Platform Member Profile Picture
    on at

    Hey @leyburn19 did you ever find a solution to determine if a file is closed? Could really do with a dig out !

  • leyburn19 Profile Picture
    2,157 on at

    Means I ahve to have 27 files with 27 processes.  Not really a good solution plus there are restrictions on API calls per minute etc

  • leyburn19 Profile Picture
    2,157 on at

    Not really.  the way I solved this was I looked at a store request getting stored in a temp list first.  Then the flow runs on a schedule.  The process looks at this list and then does the loop

  • jostle Profile Picture
    2 on at

    Before you run your main flow you could always try and move the file ......

     > if it moves then the file isn't open

     > if it doesn't move then you have a problem (2nd check for the purists ..... the error message tells you it is locked)

     

    after searching a little more i found this .....

    Locked file checking pattern in Power Automate • Tomasz Poszytek, Business Applications MVP

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard