Stay organized with collections Save and categorize content based on your preferences.
This section presents a codelab you can use to become familiar with the Google Sheets API. Also provided are a set of "recipe" examples that demonstrate how to translate an intended Google Sheets action into an API request.
Often there's more than one way to complete a given task with the API. When you're deciding on how to approach a task, keep the following in mind:
spreadsheets.values
collection is a better choice than the spreadsheets
collection. The former's interface is easier to use for simple read/write operations.Wherever possible, use the batch methods (spreadsheet.batchUpdate
, spreadsheet.values.batchGet
, and spreadsheet.values.batchUpdate
) to bundle multiple requests into a single method call. Using these batch methods improves efficiency as they:
The examples listed in this section demonstrate how to express common actions in Sheets as Sheets API v4 requests.
These examples are presented in the form of HTTP requests to be language neutral. To learn how to implement Sheets API request protocols in a specific language using Google API client libraries, see the Read & write cell values and Update spreadsheets guides.
Recipes in this section are divided into the following categories:
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-08-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4