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 Platform Community / Forums / Power Automate / Office Script not foun...
Power Automate
Answered

Office Script not found - but appears in drop down

(0) ShareShare
ReportReport
Posted on by 6
I have a simple office script that deletes the first two rows of an Excel spreadsheet. Here is the code:
 
function main(workbook: ExcelScript.Workbook) {
  let selectedSheet = workbook.getActiveWorksheet();
  selectedSheet.getRange("1:2").delete(ExcelScript.DeleteShiftDirection.up);
}
 
I have the Office script in a SharePoint folder. The action recognizes the folder I am pulling the .ost file from in the drop-down:

 
For some reason, every time I run automation I receive the following error:
 
Action 'Run_script_from_SharePoint_library' failed: Script not found. It may have been unshared or deleted. clientRequestId: 240f072e-cd25-4be2-b17b-d5d7a7dcffbc
 
Any suggestions?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    on at
     
    That script is called Main not DeleteTop28Rows or whatever.
     
    Can you share where its got the name

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • Verified answer
    mosessouth Profile Picture
    13 on at
    I had the same situation yesterday. In my case, I got the same error message related to the script which can't be found. 
    But the real error was the Workbook. I had an error in the path for the selected workbook, which resulted in the situation that the script could not be executed. Once I corrected the path, everything was running smoothly.
     
    Give it a try and validate your entries for the wokrbook.
     
    Cheers
  • jmwillithree Profile Picture
    6 on at
    Thank you @mosessouth.
     
    In my case, the path for the selected workbook was in a private channel, which I was not able to access. I copied the private channel to a public one, after which I was able to access the selected workbook. Thanks again. 

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 506 Super User 2025 Season 2

#2
developerAJ Profile Picture

developerAJ 174

#3
Tomac Profile Picture

Tomac 168 Moderator

Last 30 days Overall leaderboard