class SpreadsheetApp method .getValues()

SpreadsheetApp is the Apps Script service.

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

What it does

Reads values from every cell in a range as a 2D array.

Why it's used

  • Load a whole table into memory to filter, sort, or send to an API.
  • Much faster than reading cells one at a time in a loop.

Common errors

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

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...
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...
Automate Form Response to Confirmation Email

Automate Form Response to Confirmation Email

Create an email automatically when someone fills out a google form. incl...
Automate Move Blank Rows

Automate Move Blank Rows

Automate the apps script we just created that moves blank rows from one ...
Brighten Up Your Checklist Automatically

Brighten Up Your Checklist Automatically

Create a cool function that brightens your sheet background from white t...
Build a Job Status Checker API in 15 Minutes

Build a Job Status Checker API in 15 Minutes

The video tutorial demonstrates how to leverage Google Sheets and Google...
Build a License Key Generator and API in 20 Minutes

Build a License Key Generator and API in 20 Minutes

How to leverage Apps Script to create an API in less than 20 minutes. Cr...
Can I Automatically Rename a Sheet based on a Date?

Can I Automatically Rename a Sheet based on a Date?

Change the title of a spreadsheet from within a cell in the spreadsheet.
Celebrate Your Completed Checklists

Celebrate Your Completed Checklists

Learn how to use apps script to add emoji animations when you complete a...
Create an Automated Task List

Create an Automated Task List

I've created simple automations to make an awesome automatic task list. ...
Create a Tracking Number Fetcher with Google Sheets and Google Sites

Create a Tracking Number Fetcher with Google Sheets and Google Sites

Build a tracking number google site with Google Sheets as a backend.
Create Your Own Pride Flag Easter Egg in Sheets

Create Your Own Pride Flag Easter Egg in Sheets

If you type the letters of PRIDE in the first 5 columns in the first row...
Dylan Asks: How to Automatically Delete Rows If Cell Contains Value

Dylan Asks: How to Automatically Delete Rows If Cell Contains Value

Find out how to automatically delete rows based on a cell's value. We do...
Email Certain Department Based on Google Form Entries

Email Certain Department Based on Google Form Entries

Message a certain department when google form is submitted.
Email Myself a Daily Random Motivational Quote

Email Myself a Daily Random Motivational Quote

Quickly make a daily email to myself with a motivational quote.
Embed Quote and Author to Daily Quote Website

Embed Quote and Author to Daily Quote Website

Step by step tutorial to update random quote site to show both Quote and...
Fast FAQS

Fast FAQS

New Tool for you: Fast FAQs. Create a quick 10 question FAQ for any new ...
Google Maps Scraper for Outreach

Google Maps Scraper for Outreach

Get this fun template to search on google maps via API, and quickly mess...
Hold a Giveaway Raffle in a Google Sheet

Hold a Giveaway Raffle in a Google Sheet

Get a random winner from a list of names. Also great to randomize tasks ...
How To Format Sheets for Notes

How To Format Sheets for Notes

Create sortable notes in Three ways.  1. By adding the original word ove...
How to Power Testimonials with Google Forms and Sheets

How to Power Testimonials with Google Forms and Sheets

I show you how I use a Google Form and a Google Sheet to power the testi...
How To Send Two Emails in Same Trigger

How To Send Two Emails in Same Trigger

Without having to create two functions and two triggers you can combine ...
How to Turn Background Color to Text

How to Turn Background Color to Text

This tutorial showcases a practical solution to convert visual cues into...
I Created an Automatic Emailer

I Created an Automatic Emailer

While creating SheetOps, a new product, I came up with this idea of an a...
Idea Graveyard - Create a Decaying Checklist

Idea Graveyard - Create a Decaying Checklist

Build a simple function that deletes undone items in our checklist.
Laziest Checklist Ever

Laziest Checklist Ever

Get your spreadsheet to check off your checklist for you. Dive into spr...
LinkTree in a Google Sheet

LinkTree in a Google Sheet

This tool will allows you to share multiple links on your social media.
Manage Your Wedding Guest List in Google Sheets

Manage Your Wedding Guest List in Google Sheets

Learn how to manage any event with RSVPs and multiple organizers. Use Go...
MicroManager: Hourly Email Reminders

MicroManager: Hourly Email Reminders

I'll show you how to set up a super powered checklist that can act like ...
Move Blank Rows

Move Blank Rows

Apps Script function to move all blank rows if a certain column is not f...
Onboarding Scheduler

Onboarding Scheduler

I will guide you through the process of creating an onboarding scheduler...
OpenAI API Prompt with Array of Cells

OpenAI API Prompt with Array of Cells

Create a prompt to OpenAI with an array of cells
Quickly Build a Daily Random Motivational Quote Website

Quickly Build a Daily Random Motivational Quote Website

Build a website from scratch using a little bit of Google Sheets as the ...
Saving OpenAI API Calls inside of Google Sheets

Saving OpenAI API Calls inside of Google Sheets

Copy text output and input into a google sheet from your OpenAI API call...
Shaman: AI Blog Writer

Shaman: AI Blog Writer

I will introduce you to the power of AI writing in Google Sheets using a...
Sheet Stories / Video Notes + Clear 24 Hour Old Videos

Sheet Stories / Video Notes + Clear 24 Hour Old Videos

Revolutionary Method to Manage Your Video Stories! Learn how to delete o...
Simple Inventory Management Automations

Simple Inventory Management Automations

Create a few simple automations like email notifications and low stock a...
SOLUTIONS! Solve The Errors, Learn For Loop

SOLUTIONS! Solve The Errors, Learn For Loop

SPOILER ALERT! In this video are the full solutions to the For Loop prob...
Solve The Errors, Learn For Loop

Solve The Errors, Learn For Loop

Learn how to debug a For Loop. These are common errors that happen when ...
Spreadsheet Automation for Beginners

Spreadsheet Automation for Beginners

I start off this video with the idea to show beginners how to automate e...
Tag Emails From A List of Members in Google Sheets

Tag Emails From A List of Members in Google Sheets

Add labels to gmail emails you get from email addresses you put in a Goo...
Twitter App Clone in a Google Sheet

Twitter App Clone in a Google Sheet

I built a twitter clone in Google Sheets

Related blog posts

Written guides about SpreadsheetApp.getValues().

Browse the blog