I Am Trying To Pass A Variable From My Google Script Through To Htmloutputfromfile
I am trying to create an input box with a drop down list, where that list is based on a 2D array pulled from a Spreadsheet. My research so far has told me that if i store the HtmlS
Solution 1:
Issue:
- Attempting to modify the
HtmlOutput
object instead of modifyingHtmlTemplate
object.
Answer :
- Only the html template can be modified with variables. Modify the
template
and evaluate it to returnHtmlOutput
Snippet:
var monthBox = HtmlService.createTemplateFromFile('Month Box');//Type: HtmlTemplate
monthBox.mList = sNamesArray;
monthBox = monthBox.evaluate() //Type: HtmlOutput after evaluation
.setSandboxMode(HtmlService.SandboxMode.IFRAME)
.setWidth(250)
.setHeight(50);
monthbox = monthbox.getContent();
Post a Comment for "I Am Trying To Pass A Variable From My Google Script Through To Htmloutputfromfile"