我的 google 表格脚本运行良好,但一旦发布,菜单项就不再存在。因此,不是在插件中显示“开始”按钮(当它作为脚本运行时工作正常),它只显示我的插件的帮助。有谁知道为什么会这样?
//Runs when the addon is installed
function onInstall(e) {
onOpen(e);
}
//Creates menu entry in google ui when opened
function onOpen(e) {
SpreadsheetApp.getUi().createAddonMenu()
.addItem('Start', 'showSidebar')
.addToUi();
}