class SpreadsheetApp method .getDisplayValues()

SpreadsheetApp is the Apps Script service.

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

What it does

Reads the formatted text shown in every cell in a range.

Why it's used

  • Export a range exactly as it appears on screen.
  • Build PDFs or emails that mirror the sheet formatting.

Common errors

  • Forgetting parentheses on getDisplayValues. Write SpreadsheetApp.getDisplayValues(), not SpreadsheetApp.getDisplayValues or getDisplayValues by itself.
  • Skipping dots between chained calls. Each step needs a dot, like SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data').getDisplayValues().
  • Adding spaces where they do not belong. Write SpreadsheetApp.getDisplayValues(), not SpreadsheetApp .getDisplayValues(), SpreadsheetApp.getDisplayValues (), or SpreadsheetApp . getDisplayValues().
  • Wrong capitalization. Use SpreadsheetApp and getDisplayValues, not spreadsheetapp or getdisplayvalues.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.

Related blog posts

Written guides about SpreadsheetApp.getDisplayValues().

Browse the blog