workflow automation

From personal scripts to shared solutions: automate Excel without OneDrive limits

Navigating the integration of Office Scripts and Power Automate in Excel can be challenging, especially when aiming for a seamless handover to another department.

5 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

The frustration is not just a niche annoyance, it highlights a broader gap in the 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. The first article 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. 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 being served. 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?

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

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.

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community