[英]Call App Script from Different Spreadsheet
I have Four spreadsheets one is Admin spreadsheet where all the code is written and other three are employee sheets. 我有四个电子表格,一个是管理电子表格,其中编写了所有代码,其他三个是员工表。
So I want to call script in Admin sheet from Employee sheet using button. 所以我想使用按钮从员工表中调用管理表中的脚本。 Whenever user clicks on button it copies data to Admin sheet.
每当用户单击按钮时,它将数据复制到管理表。
I do not want code to be in each employee spreadsheet . 我不希望代码出现在每个员工电子表格中。 I want all the code to be in Admin spreadsheet and give link to call the script from the employee spreadsheets.
我希望所有代码都在Admin电子表格中,并提供链接以从员工电子表格中调用脚本。
I did not get solution after searching in google. 在谷歌搜索后,我没有得到解决方案。 Tried to use webapps but I think it is used only for HTML pages.
尝试使用webapps,但我认为它仅用于HTML页面。
I think that your best bet is to create an add-on. 我认为您最好的选择是创建一个附加组件。
If you are using G Suite then the add-on could be published only to be used by users from the same domain. 如果您使用的是G Suite,则该附件只能发布给同一域的用户使用。
An add-on it's better than a library or as publishing the script as an API because these alternatives require a script to call them. 插件比库或将脚本发布为API更好,因为这些替代方法都需要脚本来调用它们。
Reference 参考
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.