I know that Excel TypeScript scripts are saved to your OneDrive, and that you can share that script with other members of your organization (though it seems you can only share it with everybody, not specific people).
Is there a way to embed the script into the .xlsx file? So that if I made a copy and gave it to somebody, they could use the scripts too without having to manually import them? I want to bring the script down from the Office Cloud level and store in inside of the workbook, so that I can make copies of the file for other users to own themselves.
I just ran a test- I created a script in an excel file and added a button for it on the page. I closed that excel file, opened another, and deleted the script. Then I went back to the first file, and I couldn't run the script. It seems that, at least by default, they are 100% stored externally from the file.
Is such a thing possible?
I don't believe that embedding Office Scripts is supported per this link. You can see an excerpt from that link below (I've bolded certain parts for emphasis):
Office Scripts are stored as .osts files in your Microsoft OneDrive or a SharePoint folder. They are stored separately from a workbook. To give users who are outside of the SharePoint site access to the script, share the script with an Excel workbook. This means you're linking the script with the file, not attaching it. Whoever has access to the Excel file will also be able to view, run, or make a copy of the script.
The scripts themselves are separate from the Excel workbook, but you can associate scripts with a workbook in two ways: by sharing through the Office Scripts ui (script details, ... menu -> share) or by placing a button (same menu -> Add Button). Those associations are written into the xlsx, so copies of the workbook will retain those associations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With