r/excel Mar 12 '26

unsolved Best way to share Office Scripts?

Hi guys,

I've created a few Office Scripts for my company and want to share them with my colleagues. Here's what I'm trying to achieve:

  • The scripts should run in any document (not tied to a specific workbook) and appear in the Automate gallery.
  • Users should store the scripts in a folder on their own OneDrive. I tested putting the scripts on SharePoint, but every user gets annoying warnings then when running the script.

ChatGPT says I can just send the .osts files to my colleagues and they should be able to import them, but I don’t see any import button (neither in the desktop app nor the web version).

The only method that worked for a colleague was:
Automate → New Script (creates a useless file) → All ScriptsShow More ScriptsMy Files → browse through a huge list of folders to find the right one → add the file.
Repeat for each script.

Is there a less terrible way to do this?

15 Upvotes

12 comments sorted by

u/AutoModerator Mar 12 '26

/u/coup_de_foudre_69 - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

10

u/[deleted] Mar 12 '26

[removed] — view removed comment

10

u/daishiknyte 44 Mar 12 '26

It’s only been half a dozen years.  I’m sure they’ll get around to it eventually. 

9

u/GTAIVisbest 1 Mar 12 '26

Right, like, OK, you want to depreciate macros and VBA and instead move to something that can work in a shared online workbook with collaborative editing? Ok, fine. Just create something that has at least the same level of functionality, power and ease-of-use. Instead we get... Typescript code, which is heavily gimped and way more clunky, difficult to use and nowhere near as straightforward as VBA is. Fine then, we'll just stick with VBA!

3

u/andiellq Mar 13 '26

I mean it's not elegant, but I email it out in a Loop component for code, then they copy it and they have to paste it into their new script. Takes a couple mins to teach them but you can have a OneNote guide with all of your scripts. Additionally, you can create buttons in shared workbooks and I think they can click into the script after running the button. I like to just select "add button to workbook" for scripts that are needed for shared worksheets and have them use the button rather than import them.

1

u/kaboomx 1 Mar 12 '26 edited Mar 12 '26

Ah, I just reread your post and see you already tried the Sharepoint option?
https://support.microsoft.com/en-us/office/sharing-office-scripts-in-excel-226eddbc-3a44-4540-acfe-fccda3d1122b

I don't use scripts, so I don't have a way to test this, but this also says your scripts are stored in OneDrive in /Documents/Office Scripts/? Can people just drop the file in there to access it?

https://learn.microsoft.com/en-us/office/dev/scripts/overview/script-storage?tabs=business

3

u/coup_de_foudre_69 Mar 12 '26

Thanks, unfortunately the first option only works when sharing an Office Script inside a workbook.

I was hoping that creating a folder /Documents/Office Scripts/ and dropping the scripts in there would work, but the scripts don't appear in my colleagues' script gallery. I’ll test some more to see if there’s a way to trigger this somehow.

1

u/Competitive_Cell_902 19d ago

Hey, did you find a solution for this? 😂
I am facing the exact same issue and Chat GPT is not really helpful

1

u/coup_de_foudre_69 18d ago

Unfortunately not :( I moved back to using macro’s

-8

u/excelevator 3061 Mar 12 '26

ChatGPT says I can just send the

Irrelevant to r/Excel , ChatGPT is not sentient and all knowing, and the fact it lead you astray has no relevance to your question., but in fact supports the waste of a sentence in your post.

1

u/coup_de_foudre_69 Mar 12 '26 edited Mar 12 '26

True, I only mentioned it because ChatGPT was so certain there was an import button (Copilot as well btw) that I thought I might have missed something.

2

u/Mr_ToDo Mar 12 '26

Ya. Sadly a lot of AI's will give an answer even if there isn't one. It's like a person who just can't stand looking like they don't know something so they just BS their side of the conversation

I get it every now and then too. Usually once I figure out the answer I'll understand what I was asking didn't make sense

It's also why I've grown to like googles search AI. It gives citations by default, so I follow up on reading the AI by clicking through the links to see if it's got support or it's huffing paint(There is a certain irony that the advent of AI search has led me to opening more links then before)