class HtmlService method .setHeight()

HtmlService is the Apps Script service.

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

What it does

Sets the height of a dialog in pixels.

Why it's used

  • Tall enough sidebars for logs or long lists.
  • Stop dialogs from clipping scrollable content.

Common errors

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

Explore

Related methods

Better Sheets tutorials

Big Year - a Whole Year in One Google Sheets Tab

Big Year - a Whole Year in One Google Sheets Tab

Get "Big Year" for free via Gumroad. Get perspective on your 2024 plan ...

Related blog posts

Written guides about HtmlService.setHeight().

Browse the blog