简体   繁体   English

使用谷歌应用程序脚本启用和禁用自定义谷歌表格功能

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

相关问题 在 Google Apps Script 上使用带有自定义函数的触发器 - Using triggers with custom functions on Google Apps Script 在谷歌脚本中使用谷歌表格函数 - using google sheet functions inside google script 使用 Google Apps Script 根据 Google Sheet 中的值禁用日期选择器中的日期 - Disable dates in the datepicker based on values from the Google Sheet using Google Apps Script 以编程方式禁用/启用 Google Apps 脚本脚本触发器 - programmatically disable / enable Google Apps Script script trigger 在 Google Apps 脚本中重复执行自定义函数 - Repeated executions of custom functions in Google Apps Script 我希望我的 Google Apps 脚本自定义菜单功能仅适用于特定工作表 - I want my Google Apps script custom menu functions to only work on a specific sheet 使用 Google Apps 脚本中的自定义页眉或页脚将 Google 表格导出为 PDF - Exporting Google Sheet as PDF with Custom Headers or Footers in Google Apps Script 使用Google Apps脚本在Google工作表中边栏宽度未更改 - Sidebar width not changing in Google sheet using Google apps script 使用Google Apps脚本在Google工作表中搜索字符串 - Search string in google sheet using google apps script 使用 Google Apps 脚本从 JSON object 创建 Google 表格 - Create Google Sheet from JSON object using Google Apps Script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM