How to share one Google Apps script between few do

2019-08-31 07:21发布

I wrote short script for numbering of document sections. But every time when I want to use it in new document I must create new copy of that. I tryed to publish the script by option "Deploy as web app..." but it is not clear how to connect it in new document. Is it possible? I have few documents in Google Drive and few copies of same script for each of document. Can I connect every document to one script? Thanks a lot!

2条回答
小情绪 Triste *
2楼-- · 2019-08-31 08:16

This is not possible for now, there is an open enhancement request that you could star to mark your interest and be informed if something new comes up...

查看更多
3楼-- · 2019-08-31 08:18

I had a similar problem. The leaner solution that I was able to imagine is to keep the function in a saparate, shared script file. In the spreadsheet script, you will use the shared script file as a library.

In this way, your logic remains in a single copy, the actual part of the logic that is copied several time is only a call to a shared function.

查看更多
登录 后发表回答