mythosil
mythosil

Reputation: 423

Is there any way to open custom menu programmatically in Google Sheets?

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?

Upvotes: 0

Views: 160

Answers (2)

David Morales
David Morales

Reputation: 670

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()

Upvotes: 1

doubleunary
doubleunary

Reputation: 19185

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.

Upvotes: 2

Related Questions