I have created this simple script in a Google Sheet:
function onOpen() {
SpreadsheetApp.getUi()
.createMenu("My Private Menue")
.addItem('My html Dialog', 'StartMessage')
.addToUi();
ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1").activate();
var html = HtmlService.createHtmlOutputFromFile('Message');
SpreadsheetApp.getUi().showModalDialog(html, 'TITELLEISTE');
}
But the HtmlService
does not start directly. But when I click on my created menu, the HtmlService
executes without problems.
Where is my fault? Here I have shard my file.