How to create custom keyboard shortcuts for google app script functions?

后端 未结 9 1619
灰色年华
灰色年华 2020-12-04 12:10

I\'m trying to get a sense of the viability of replacing some of my Microsoft Excel spreadsheets with Google Doc Spreadsheets. How can I create a custom keyboard shortcut t

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 12:52

    Great news :) You can achieve custom keyboard shortcuts for google app script functions following next easy steps:

    1. In the Google Sheets UI, select Tools > Macros > Record Macro.
    2. Record any action. For instance, change the color background in A1. Press Save.
    3. Save it with a random title and the preferred shortcut. You can change it later.
    4. Select Tools > Script editor to open the script bound to the sheet in the Apps Script editor.
    5. In the new editor tab, select View > Show Manifest File
    6. TA - DÁ! :D Change the functionName value to the desired one ;)

    Remember macro functions should take no arguments and return no values. More info at https://developers.google.com/apps-script/guides/sheets/macros#importing_functions_as_macros

提交回复
热议问题