[英]Google Apps Script Library and Script Distribution
i was wondering if there is a possibility to distribute my Custom Script to all the sheets in my workspace. 我想知道是否可以将自定义脚本分发到工作区中的所有工作表。 I came upon different ways with libraries or Add-ons, but they all lack some points i want to accomplish.
我使用库或加载项遇到了不同的方式,但是它们都缺少我想完成的几点。
So far i can use the Library Option and create a new Script for all my Files and call my Main Function out of that Library. 到目前为止,我可以使用Library Option并为我的所有文件创建一个新脚本,然后从该Library中调用我的Main Function。 This Workaround does not include an onOpen Trigger event.
此解决方法不包括onOpen触发事件。 When i use the Ability of run->test as addon and manually add all new Files (which come up every new month) i also lack the possibility of trigger functions.
当我使用“ 运行->测试能力” 作为插件并手动添加所有新文件(每隔一个月更新一次)时,我也没有触发功能的可能性。
If you have Solution Ideas I'd be very happy. 如果您有解决方案的想法,我将非常高兴。
BR NJ 新泽西州
If you want to do something like overwrite an Apps Script file, that can be done with the Apps Script API. 如果您想要执行诸如覆盖Apps脚本文件的操作,则可以使用Apps Script API来完成。 Even script projects that are bound to a document (Sheets, Forms, Docs) can be overwritten with the Apps Script API.
甚至绑定到文档(表格,表单,文档)的脚本项目也可以使用Apps Script API覆盖。
StackOverflow answer - Update an Apps Script file using Apps Script StackOverflow答案-使用Apps脚本更新Apps脚本文件
You can also update the manifest file of an Apps Script file using the Apps Script API, and therefore, programmatically add a library, and the library version to an existing Apps Script File. 您还可以使用Apps Script API更新Apps脚本文件的清单文件,从而以编程方式将库和库版本添加到现有的Apps Script文件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.