Home > Software design >  Is there any way to open custom menu programmatically in Google Sheets?
Is there any way to open custom menu programmatically in Google Sheets?

Time:12-08

I have custom menus in Google Sheets.

I'd like to open the menus programmatically with Google Apps Script, e.g. SpreadsheetApp.getUi().getMenu().open() .
But I can't find out the way.

Is there any way to do that?

CodePudding user response:

Google Apps Script cannot directly access user interface elements such as menus. You cannot programmatically "click" on a menu to make it show its menu items.

CodePudding user response:

There is no way to interact with the UI, like performing clicks or opening menus.

You can execute the function that is being called by that menu.

So, if menu option A is execution function "foo", you can execute that function programmatically.

foo()
  • Related