[英]Call a Google Sheets add-on within a Google Apps Script?
Is it possible to call a Google Sheets add-on as if it were a function in an Apps Script? 是否可以像Google Apps脚本中的函数一样调用Google表格插件?
I am trying to automate a few steps like this: 我试图自动化这样的几个步骤:
All of these steps are done with 2 add-ons. 所有这些步骤都是通过2个附加组件完成的。 Ideally, I could call those add-on functions with a script and run the script with a button.
理想情况下,我可以使用脚本调用这些附加功能,然后使用按钮运行脚本。
Is this possible? 这可能吗?
AFAIK it's not possible. AFAIK这是不可能的。
Google Apps Script official documentation doesn't include this on the Guides section, by the other hand, there aren't a documented way to call add-on functions other than the custom menus and the add-on dialogs, sidebars, custom functions and triggers. 另一方面,Google Apps Script的官方文档并未在“指南”部分中提供此功能,除了自定义菜单和附加对话框,侧边栏,自定义功能以及触发。
This is possible however all users have to have view permission to the underlining script file that you publish from. 这是可能的,但是所有用户都必须具有从中发布下划线脚本文件的查看权限。
I'm not sure this is bullet proof but to help limit the exposure of the code I've: 我不确定这是否是防弹的,但为了帮助限制公开代码的作用:
1) Share code with option "Anyone at My Domain with the link" 1)使用“链接中的“我的域中的任何人””选项共享代码
2) Break off any function you don't want users to potentially see into a seperate Library ; 2)将您不希望用户看到的任何功能分解到单独的库中 ; make this Library private
将此图书馆设为私有
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.