[英]Enable and disable custom google sheet functions using google apps script
I've been trying to create a Google Spreadsheet plugin from some existing Google App Scripts that I have, and one important part of this app script is Custom Functions.我一直在尝试从我现有的一些 Google App 脚本创建一个 Google 电子表格插件,这个应用脚本的一个重要部分是自定义函数。
I have seen an addon that can enable the use of custom sheet functions using a Add-on menu我见过一个插件,可以使用插件菜单启用自定义工作表功能
https://prnt.sc/tlnplvxCwLRQ https://prnt.sc/tlnplvxCwLRQ
Any insights are greatly appreciated.非常感谢任何见解。
An add-on's custom functions will work for all users of a spreadsheet where the add-on has been enabled by any user.插件的自定义功能将适用于已由任何用户启用插件的电子表格的所有用户。 See Installed versus enabled .请参阅已安装与已启用。
To enable an add-on in a spreadsheet, run any function in the add-on.要在电子表格中启用加载项,请在加载项中运行任何 function。 The function does not actually need to do anything. function 实际上不需要做任何事情。 Executing any bit of code in the add-on will cause the authorization dialog box to show, and when you give the authorization, the add-on's status changes to enabled for that spreadsheet, and custom functions in the add-on will run in that spreadsheet for all users.执行附加组件中的任何代码都会导致授权对话框显示,当您授予授权时,附加组件的状态会更改为对该电子表格启用,并且附加组件中的自定义功能将在该电子表格中运行所有用户的电子表格。 Running a function is usually done through a custom menu item .运行 function 通常是通过自定义菜单项完成的。
To disable an add-on, use the Extensions > Add-ons > Manage add-ons dialog box.要禁用加载项,请使用扩展 > 加载项 > 管理加载项对话框。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.