I'm trying to update the content of the sidebar in a Google Sheet, depending on the current selected cell. My first dummy script is:
function onSelectionChange(e) {
var ui = SpreadsheetApp.getUi();
var range = e.range;
var selectedRow = range.getNumRows();
var htmlOutput = HtmlService
.createHtmlOutput('This is row '+selectedRow)
.setTitle('Title');
ui.showSidebar(htmlOutput);
}
... and it does nothing, i.e. no sidebar shows ever. I tried to deactivate app script v8, no change.