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 / Unable to run office s...
Power Automate
Answered

Unable to run office script through power automate - Split an excel workbook such that there is only one sheet per Excel workbook

(0) ShareShare
ReportReport
Posted on by 11
My goal is to Split an excel workbook such that there is only one sheet per Excel workbook.
 
@DamoBird365 I used your video reference from youtube and followed the steps.
 
The issue is -
 
The second script (Deletesheets.osts) does not run in powerautomate and it gives me this error:
dc96_2-1696283825949.png

 

 

 

 
You can see here the code I am using for the office script is the same from the video
 
dc96_3-1696283841846.png

 

 

A- code used in video.
B- office script code I am using.
 
 
I would appreciate help from this community, since I have been breaking my head on this task since last week.
 
Appreciate your time and help in advance.
 
Thanks.
 
Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,551 Super User 2026 Season 1 on at

    is the office script hosted in the file you are trying to modify?

  • dc96 Profile Picture
    11 on at

    I am not sure, what you mean by script hosted in the specific file or not? I can access all my office scripts through any new excel file I create.

  • lbendlin Profile Picture
    8,551 Super User 2026 Season 1 on at

    But you shouldn't.  Better to have a dedicated file that hosts the scripts, but is otherwise not involved in the flows.

  • Verified answer
    dc96 Profile Picture
    11 on at

    I figured the issue I had.

     

    dc96_0-1697470460168.png

    Need to toggle on the right so that it takes the input as an array.

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 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard