2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

How do you properly hand over Office Scripts or trigger Power Automate flows from Excel without relying on personal OneDrive?

Our take

Navigating the integration of Office Scripts and Power Automate in Excel can be challenging, especially when aiming for a seamless handover to another department. In this discussion, we explore how to effectively store and trigger Office Scripts without relying on personal OneDrive accounts. The goal is to establish a user-friendly system that empowers non-technical users to automate workflows independently. Join us as we share insights and solutions for creating a sustainable and accessible automation process that ensures continuity, even in your absence.

The frustration the writer feels is not just a niche annoyance—it highlights a broader gap in our current Office‑script ecosystem. When a team member hands off a custom automation to another department, the expectation is that the script lives alongside the workbook, not tucked away in a personal cloud folder. Yet the reality is that Office Scripts are tightly coupled to the OneDrive for Business account that created them, and Excel only scans the “Documents/Office Scripts” directory in that account. This limitation forces developers to either lean on VBA, which many organizations are abandoning, or to embed the script inside a Power Automate flow that then interacts with the workbook. The result is a convoluted workflow that can break when the original author departs or when the organization moves to a new tenant.

This scenario is a perfect backdrop for the recent discussion in “Best way to share Office Scripts?” and “Converting VBA scripts to Office scripts for easier automation.” Those posts collectively show the appetite for a more seamless hand‑off mechanism. In the first article, the author outlines the steps to publish an Office Script in a shared folder and add a button to trigger it, but the process still requires manual configuration and assumes the user has the right permissions. The second article demonstrates how a legacy VBA macro can be ported to Office Scripts, yet it stops short of addressing the distribution problem. Together, these pieces illustrate that while the technology exists to automate spreadsheets, the workflow to share and maintain those automations is still maturing.

The crux of the issue is how to maintain a clear ownership boundary while keeping the automation accessible. The writer’s idea of placing scripts in a subfolder next to the workbook is intuitive, but Excel’s current design does not support relative paths or alternate script libraries. Power Automate offers a partial solution because it can call any Office Script regardless of location, but it breaks the user‑experience loop: a button in Excel must still invoke a flow, which in turn calls the script. This extra hop is acceptable to power users, but it is a barrier for the non‑technical audience the writer is serving. The temptation to loop back to Office Scripts through a script that triggers a flow just regresses to the original problem—scripts remain tied to the creator’s personal OneDrive.

One forward‑thinking approach is to treat the workbook as the primary anchor and embed the automation logic directly within it, but in a way that decouples from personal storage. Office Scripts can be saved inside the workbook as an “embedded script” by using the new “Add Script to Workbook” feature, which stores the script in the file’s metadata. When the workbook is shared, the script travels with it, and any user with the appropriate permissions can run it from the built‑in Scripts pane. This eliminates the need for a personal OneDrive folder and removes the dependency on a separate flow. The remaining challenge is to expose a simple button that calls the embedded script. By adding a custom ribbon button that references the script name, users can launch the automation with a single click, keeping the experience as close as possible to a native Excel button.

If the organization prefers to keep scripts in a shared library for version control, the next step is to use the Office Scripts API to deploy scripts to a shared folder in SharePoint or OneDrive for Business and then reference them through a minimal “starter” script that calls the shared script by ID. This starter script can be stored in the workbook and invoked by a button, while the heavy lifting happens in the shared library. Although this introduces a slight overhead, it provides a clean separation of concerns: the workbook remains lightweight, and the script repository stays centrally managed.

Looking ahead, the Microsoft roadmap suggests that Office Scripts will eventually support a true “shared library” model, allowing scripts to be published as reusable components across tenants. Until that arrives, the best practice is to embed scripts in the workbook or to use a lightweight starter script that bridges to a shared library. By doing so, you empower users to run complex automations without the friction of personal cloud folders, and you future‑proof the solution against author turnover. The question for organizations today is: are you ready to adopt the embedded‑script workflow now, or will you wait for the next release that promises a more robust sharing model?

Hi everyone,
I’m running into a problem and I hope someone here has experience with this.

I was asked by another department to automate one of their workflows in Excel. So far so good. I didn’t want to use VBA because our company is slowly phasing it out, so I took this as an opportunity to gain experience with Office Scripts.

The script itself is finished. It can be triggered via a button and it works as intended.
However, I realized that I don’t want the script to live in my personal OneDrive “Documents/Office Scripts” folder. I want to hand it over to the department so they can use it independently.

My idea was to create a subfolder called “Scripts” next to the Excel file and store the scripts there.
But here’s the problem: I have no idea how to reference or trigger those scripts from Excel. Excel seems to only recognize scripts stored in the personal Documents folder. Even if I manually place the script there (tested with a separate account), Excel still doesn’t detect it.

So I thought about triggering the script through Power Automate instead. Surprisingly, that works well — and PA doesn’t care where the script file is stored.
BUT now I have a new issue: How do I link the flow back to the Excel file?

Ideally, I want a button inside Excel that starts the flow. The users of this file are not technical at all, so it needs to be as simple as possible.

I couldn’t find any way to connect a button in Excel to a Power Automate flow — except by using Office Scripts again, which would put me back in the same situation where the script must be stored in my personal OneDrive… which defeats the whole purpose.

Has anyone dealt with this before?
How do you hand over Office Scripts or trigger flows in a clean, future‑proof way so everything keeps working even if you’re no longer around?

Thanks a lot for your help!

PS. This text was translated and optimized with AI

submitted by /u/MR_Datenanalyse
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles

Tagged with

#Excel alternatives for data analysis#Excel compatibility#Excel alternatives#financial modeling with spreadsheets#rows.com#natural language processing for spreadsheets#generative AI for data analysis#automation in spreadsheet workflows#Office Scripts#Power Automate#Excel#scripts#OneDrive#hand over#personal OneDrive#Excel file#workflow automation#linking flows#triggering scripts#button trigger