Overview
The Sheets service provides access to Google Sheets v4 API for reading and writing spreadsheet data, managing sheets, and applying formatting. API:sheets (v4)
Common Use Cases
- Read and write cell data
- Create and manage spreadsheets
- Append rows to sheets
- Format cells and ranges
- Create charts and pivot tables
Helper Commands
+append
Append rows to a spreadsheet:
Simple values
Multiple rows (JSON)
+read
Read values from a range:
Command Examples
Create a Spreadsheet
Empty spreadsheet
With initial sheets
Example Response
Example Response
Read Values
Example Response
Example Response
Write Values
Update range
Append rows
Clear Values
Batch Update
Multiple operations
Add Sheet
Delete Sheet
Format Cells
Bold header row
Set column width
Create Named Range
Sort Range
Get Spreadsheet Metadata
Value Input Options
When writing data, thevalueInputOption parameter controls how values are interpreted:
RAW: Values are stored as-is (strings remain strings)USER_ENTERED: Values are parsed as if typed by a user (formulas, dates, numbers auto-detected)
Store as string
Parse as formula
Resources
spreadsheets- Spreadsheet operationsspreadsheets.values- Read/write cell valuesspreadsheets.sheets- Sheet managementspreadsheets.developerMetadata- Custom metadata
gws sheets <resource> --help to see all available methods.
Related Commands
Drive
Manage spreadsheet files
Docs
Work with documents