The docs for HtmlService don\'t state that this shouldn\'t work, but it seems that the template approach is limited to web app Apps Script projects.
I am attempting
It seems you haven't gone through the documentation in detail. Please, look at the reference documentation of class HtmlTemplate.
You need to evaluate()
a template to create an HtmlOutput
object.
function showSidebar(){
var html = HtmlService.createTemplateFromFile('changeDialog');
var a = "test";
SpreadsheetApp.getUi()
.showSidebar(html.evaluate());
//////////
}
Since your changeDialog.html
file contains no template tags, you could instead create an HTML file from it directly:
function showSidebar(){
var html = HtmlService.createOutputFromFile('changeDialog');
//////
var a = "test";
SpreadsheetApp.getUi()
.showSidebar(html);
}