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 / 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,474 Super User 2025 Season 2 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,474 Super User 2025 Season 2 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

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

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard