class SpreadsheetApp method .getValue()

SpreadsheetApp is the Apps Script service.

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

What it does

Reads the value stored in a single cell.

Why it's used

  • Read a single setting cell, status flag, or lookup key.
  • Check one cell before deciding what the rest of the script should do.

Common errors

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

Explore

Related methods

Better Sheets tutorials

2 New Ways To Add Emoji Reactions

2 New Ways To Add Emoji Reactions

 Revolutionize the way you react with emojis! Discover two new methods t...
5 Ways To Use Google Sheets for Advanced Project Management

5 Ways To Use Google Sheets for Advanced Project Management

Here are 5 advanced ways to manage projects inside of Google Sheets Man...
Access the Dictionary API to get Definitions for Words in Google Sheets

Access the Dictionary API to get Definitions for Words in Google Sheets

Add A Timestamp to Task Lists (without Now Formula)

Add A Timestamp to Task Lists (without Now Formula)

How to add a timestamp to done tasks. Learn how to easily add timestamps...
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...
Add Tasks to Google Tasks From Google Sheets

Add Tasks to Google Tasks From Google Sheets

Create tasks in Google Tasks from Google Sheets using Apps Script
Automated Project Management in Google Sheets

Automated Project Management in Google Sheets

Create automatic notifications when a project is assigned, a project nee...
Automate Emails

Automate Emails

Set up automated email notifications based on Google Sheets data. Super ...
Automatic Calculations

Automatic Calculations

Create custom scripts to make your spreadsheets more like tools.

Related blog posts

Written guides about SpreadsheetApp.getValue().

Browse the blog