Sheets macro manifest resource

  • To define Sheets macros, you must use a specific configuration within a manifest, ensuring all required fields are included.

  • The top-level Sheets configuration in the manifest is exclusively used for defining Sheets macros and contains a required list of macro objects.

  • Each individual Macro object within the manifest configuration requires defining a function name and a menu name.

  • Macros can optionally have a unique default keyboard shortcut defined using the format "Ctrl+Alt+Shift+Number".

The configuration that is used to define Sheets macros. Manifests that define macros must have all the fields marked as Required.

The top-level of the Sheets macro manifest configuration. This is only used to define Sheets macros.

JSON representation
{
  "macros": [
    {
      object (Macro)
    }
  ]
}
Fields
macros[]

object (Macro)

Required. A list of defined macros and their associated properties.

Macro

The configuration for a single macro. The definition must have all the fields marked as Required.

JSON representation
{
  "defaultShortcut": string,
  "functionName": string,
  "menuName": string
}
Fields
defaultShortcut

string

Defines the keyboard shortcut that executes the macro. This must be of the form Ctrl+Alt+Shift+Number, where Number is a single-digit. Macros without shortcuts can only be executed from the Tools > Macros menu.
functionName

string

Required. The name of the Apps Script function that executes the macro. By default this matches the menuName for functions automatically created, but this is not a requirement.
menuName

string

Required. The name of the macro as it appears in the Google Sheets UI.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.