Capture the name of the selected UI menu option

后端 未结 1 1488
时光取名叫无心
时光取名叫无心 2021-01-28 10:27

I\'m trying to add entries to the menu of a Google Sheet:

  ui.createMenu(\'Push to Sheet\')
    .addItem(\'Texas\', \'menuItem\')
    .addItem(\'Illinois\', \'m         


        
1条回答
  •  一整个雨季
    2021-01-28 10:59

    No, this information is not exposed. You'll need to define specific functions to handle each menu item.

    eg:

     function texasItem(){
        menuItem('Texas');
     }
    
     function illinoisItem(){
        menuItem('Illinois');
     }
    

    0 讨论(0)
提交回复
热议问题