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 Automate
Unanswered

Scripts

(0) ShareShare
ReportReport
Posted on by 2
Hello,
 
I am attempting to check out a file from the library and run two different scripts. I keep getting an error message that reads Action 'Run_script_1' failed: We were unable to run the script. Please try again. The script couldn't create a connection with Excel. Please try again. 
 
What is strange is that the first script runs but the second one does not. Both scripts are for the same file. Can someone help explain why this is happening?
 
 
Script 1:
 
 
Script 2: 
Categories:
I have the same question (0)
  • Srini007 Profile Picture
    3,463 Super User 2026 Season 1 on at
     
    1. Concurrent Access Issue:
    • Power Automate does not allow multiple scripts to run on the same Excel file at the same time. If your first script is still executing, the second one might fail due to a locked file.
    2. Script Timing Issue:
    • The second script may be starting before the first script has completed, causing a conflict.
    3.   Excel File is Open in Another Program:
    • If the file is open in Excel Desktop or another service (like OneDrive or SharePoint), it could cause conflicts.
    4.  Power Automate Not Handling the Conflict Gracefully:
    • If Power Automate tries to run multiple instances of a script at the same time, the second one may be rejected.
    Solution: Try placing a delay between the scripts and also make sure that it the second script is running after the 1st script, also check the 1st script is not making the file locked
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini
  • JS-20031635-0 Profile Picture
    2 on at
    Hello @SriniK
     
    Thank you for the response! I tried what you suggested and added a 5 min delay between the scripts. It still gave me the same error as before. See below.
     
    I am also not do know how to check if the first script is locking the file. I appreciate your input and time you spent on this!
  • Srini007 Profile Picture
    3,463 Super User 2026 Season 1 on at
     
    Can you estimate on how much data your script is running if the data is high, I think you need to give more delay instead of keeping just 5 minutes, also make sure that in your script you have properly closed before running the second script.
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini

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 Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard