Google Sheets API Overview (original) (raw)

Google Sheets API Overview

Stay organized with collections Save and categorize content based on your preferences.

The Google Sheets API is a RESTful interface that lets you read and modify a spreadsheet's data. The Sheets API lets you:

The following is a list of common terms used in the Sheets API:

Spreadsheet

The primary object in Google Sheets. It can contain multiple Sheets, each with structured information contained in Cells. Thespreadsheetsresource represents a spreadsheet. It contains a unique spreadsheetIdvalue.

Spreadsheet ID

The unique identifier for a spreadsheet. It's a particular string containing letters, numbers, and some special characters that reference a spreadsheet and it can be derived from the spreadsheet's URL. Spreadsheet IDs are stable, even if the spreadsheet name changes.

https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit?gid=SHEET_ID#gid=SHEET_ID

Sheet

A page or tab within a spreadsheet. TheSheets resource represents a sheet. It contains a unique numeric sheetId value and sheettitle as part of theSheetPropertiesobject.

Sheet ID

The unique identifier for a specific sheet within a spreadsheet. It's a particular integer containing numbers that reference a sheet and it can be derived from the spreadsheet's URL. Sheet IDs are stable, even if the sheet name changes. For an example, see Spreadsheet ID.

Cell

An individual field of text or data within a sheet. Cells are arranged in rows and columns, and can be grouped as a range of cells. TheCellsresource represents each cell, but it doesn't have a unique ID value. Instead, row and column coordinates identify the cells.

A1 notation

A syntax used to define a cell or range of cells with a string that contains the sheet name plus the starting and ending cell coordinates using column letters and row numbers. This method is the most common and useful when referencing an absolute range of cells.

Show examples

Single quotes are required for sheet names with spaces or special characters.

Tip: Where possible, use distinct names for objects in your spreadsheets. For example, A1 (without quotes) refers to cell A1 in the first visible sheet. 'A1' refers to a sheet with the name A1. Similarly, Sheet1 refers to a sheet with the name Sheet1. However, if there's a named range titled "Sheet1", then Sheet1 refers to the named range and 'Sheet1' refers to the sheet.

R1C1 notation

A syntax used to define a cell or range of cells with a string that contains the sheet name plus the starting and ending cell coordinates using row numbers and column numbers. This method is less common than A1 notation, but can be useful when referencing a range of cells relative to a given cell's position.

Show examples

Named range

A defined cell or range of cells with a custom name to simplify references throughout an application. AFilterViewresource represents a named range.

Protected range

A defined cell or range of cells that cannot be modified. AProtectedRangeresource represents a protected range.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.