Google 表格宏清单资源
用于定义
Google 表格宏的配置。用于定义宏的清单必须将所有字段都标记为必填。
表格
Google 表格宏清单配置的顶级。此参数仅用于定义 Google 表格宏。
JSON 表示法 |
{
"macros": [
{
object (Macro)
}
]
} |
字段 |
macros[] |
object (Macro)
必需。已定义宏及其关联属性的列表。
|
宏
单个宏的配置。定义中的所有字段都必须标记为必填。
JSON 表示法 |
{
"defaultShortcut": string,
"functionName": string,
"menuName": string
} |
字段 |
defaultShortcut |
string
定义用于执行宏的键盘快捷键。
此值必须采用 Ctrl+Alt+Shift+Number 的格式,其中 Number 是一个数字。没有快捷键的宏只能通过工具 > 宏菜单执行。
|
functionName |
string
必需。用于执行宏的 Apps 脚本函数的名称。默认情况下,此值与自动创建的函数的 menuName 匹配,但这不是必需的。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-21。
[null,null,["最后更新时间 (UTC):2024-12-21。"],[[["Sheets macros are defined using a manifest configuration, which must include all required fields."],["Each macro definition specifies a keyboard shortcut, the name of the Apps Script function to execute, and the menu name displayed in the Google Sheets UI."],["The keyboard shortcut must be unique and follow the format `Ctrl+Alt+Shift+` followed by a single digit."],["Macros without assigned shortcuts can only be run from the **Tools \u003e Macros** menu in Google Sheets."]]],[]]