How to make set of scripts available for all my Google Spreadsheets?

前端 未结 3 1017
情书的邮戳
情书的邮戳 2020-12-17 05:36

Excel supports the concept of a PERSONAL.XLS file which contains my personal scripts, which I want to be able to use on any spreadsheet/workbook that I open.

How do

相关标签:
3条回答
  • 2020-12-17 06:16

    1) You can open your Script and from the Publish menu select "Test as add-on".

    2) Now under "Configure New Test" you can select a document and then run the add-on for that doc.

    Unfortunately you have to do this for each document one at a time. I would really love it if there was a way to tell a script to be available for all my spreadsheets, or at least have an easy way to install a personal add-on on a per-sheet basis just like you can install an add-on from the marketplace, kinda like a personal marketplace.

    0 讨论(0)
  • 2020-12-17 06:26

    Although not recommended, You can also copy set of scripts to all other google spreadsheets programmatically using AppsScriptApi

    0 讨论(0)
  • 2020-12-17 06:27

    You cannot do that in Google Spreadsheets. However the best practice is to

    1. Write a standalone script with your onOpen and other functions.
    2. Publish this as a library
    3. Write a shell onOpen in each of the spreadsheets that you create manually. :( This shell function will call the library's onOpen.

    However, if you create a copy of a spreadsheet that has an associated script, then the copy will also have the script in it.

    0 讨论(0)
提交回复
热议问题