class HtmlService method .createHtmlOutput()

HtmlService is the Apps Script service.

.createHtmlOutput() is the method name you will see after a dot in your code.

What it does

Builds HTML output from a string for dialogs or sidebars.

Why it's used

  • Build a sidebar or dialog from an HTML string.
  • Prototype UI without a separate .html file.

Common errors

  • Forgetting parentheses on createHtmlOutput. Write HtmlService.createHtmlOutput(), not HtmlService.createHtmlOutput or createHtmlOutput by itself.
  • Skipping dots between chained calls. Each step needs a dot, like HtmlService.createHtmlOutput().
  • Adding spaces where they do not belong. Write HtmlService.createHtmlOutput(), not HtmlService .createHtmlOutput(), HtmlService.createHtmlOutput (), or HtmlService . createHtmlOutput().
  • Wrong capitalization. Use HtmlService and createHtmlOutput, not htmlservice or createhtmloutput.

Explore

Related methods

1 Better Sheets tutorials

Add Click Tracking To Your Google Sheets | Bitly in a Google Sheet

Add Click Tracking To Your Google Sheets | Bitly in a Google Sheet

Create a click Edit: Google changed how the redirect is handled. It no l...

Related blog posts

Written guides about HtmlService.createHtmlOutput().

Browse the blog