简体   繁体   English

从其他电子表格调用应用脚本

[英]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.

相关问题 谷歌应用脚本从电子表格中读取不同的时区 - Google app script reading different timezones from Spreadsheet Google应用脚本可从同一电子表格创建多个图表,但不同列的范围不同 - Google app script to create Multiple Charts & Tables from same spreadsheet but different range from different column Gmail应用程序脚本从电子表格添加密件抄送 - Gmail App Script Add BCC from Spreadsheet 将电子表格上不同工作表的列数与应用程序脚本进行比较的脚本 - Script to compare the number of columns of different sheets on a Spreadsheet with App scripts Google App脚本电子表格 - Google App Script Spreadsheet 如何从部署为网络应用的Google应用脚本中打开电子表格 - How to open spreadsheet from Google app script deployed as web app 按钮操作,使用Google App脚本从电子表格中检索数据 - Button Action to retrieve data from spreadsheet using google app script 如何将 Ajax 中的数组值插入 Google App 脚本电子表格 - How to Insert Array Value from Ajax into Google App Script Spreadsheet 用于从电子表格下载文本文件的 Google APP 脚本 - Google APP Script to Download TEXT file from Spreadsheet 将过滤后的范围从一个电子表格复制到另一个 - Google 应用脚本 - Copy filtered range from one spreadsheet to another - Google app script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM