Skip to content

Reading

Import data from a Sheet into a local data frame

range_read() read_sheet()
Read a Sheet into a data frame
range_speedread()
Read Sheet as CSV
range_read_cells()
Read cells from a Sheet
spread_sheet()
Spread a data frame of cells into spreadsheet shape
cell-specification cell_limits cell_rows cell_cols anchored
Specify cells

Writing

Write data into a Sheet

sheet_write() write_sheet()
(Over)write new data into a Sheet
gs4_create()
Create a new Sheet
sheet_append()
Append rows to a sheet
range_write()
(Over)write new data into a range
range_flood() range_clear()
Flood or clear a range of cells

Data preparation

Helpers for preparing data to write into Sheets

gs4_fodder()
Create useful spreadsheet filler
gs4_formula()
Class for Google Sheets formulas

Metadata on Sheets

Helpers for accessing Sheets and their metadata

gs4_get()
Get Sheet metadata
gs4_find()
Find Google Sheets
gs4_browse()
Visit a Sheet in a web browser
as_sheets_id()
sheets_id class
gs4_random()
Generate a random Sheet name

Modify a Sheet

Make changes to a (spread)Sheet or to the (work)sheets it contains

gs4_create()
Create a new Sheet
range_delete()
Delete cells
sheet_add()
Add one or more (work)sheets
sheet_append()
Append rows to a sheet
sheet_copy()
Copy a (work)sheet
sheet_delete()
Delete one or more (work)sheets
sheet_properties() sheet_names()
Get data about (work)sheets
sheet_relocate()
Relocate one or more (work)sheets
sheet_rename()
Rename a (work)sheet
sheet_resize()
Change the size of a (work)sheet
sheet_write() write_sheet()
(Over)write new data into a Sheet
as_sheets_id()
sheets_id class

Formatting and aesthetics

Change how a Sheet appears in the browser UI

range_autofit()
Auto-fit columns or rows to the data

Example Sheets

World-readable Sheets to use in examples and reprexes

gs4_examples() gs4_example()
Example Sheets

Auth

Take explicit control of the googlesheets4 auth status or examine current state

gs4_auth()
Authorize googlesheets4
gs4_deauth()
Suspend authorization
gs4_user()
Get info on current user
gs4_auth_configure() gs4_api_key() gs4_oauth_client()
Edit and view auth configuration
gs4_scopes()
Produce scopes specific to the Sheets API
local_gs4_quiet() with_gs4_quiet()
googlesheets4 configuration

Programming around the Sheets API

Low-level functions used internally and made available for programming

request_generate()
Generate a Google Sheets API request
request_make()
Make a Google Sheets API request
gs4_token()
Produce configured token
gs4_has_token()
Is there a token on hand?
gs4_endpoints()
List Sheets endpoints
local_gs4_quiet() with_gs4_quiet()
googlesheets4 configuration

Operate on (spread)Sheets or the Sheets API

Functions that operate at the level of a (spread)sheet or the whole API/package

gs4_auth()
Authorize googlesheets4
gs4_auth_configure() gs4_api_key() gs4_oauth_client()
Edit and view auth configuration
gs4_browse()
Visit a Sheet in a web browser
gs4_create()
Create a new Sheet
gs4_deauth()
Suspend authorization
gs4_endpoints()
List Sheets endpoints
gs4_examples() gs4_example()
Example Sheets
gs4_find()
Find Google Sheets
gs4_fodder()
Create useful spreadsheet filler
gs4_formula()
Class for Google Sheets formulas
gs4_get()
Get Sheet metadata
gs4_has_token()
Is there a token on hand?
gs4_random()
Generate a random Sheet name
gs4_scopes()
Produce scopes specific to the Sheets API
gs4_token()
Produce configured token
gs4_user()
Get info on current user

Operate on (work)sheets

Functions that operate on whole (work)sheets

sheet_add()
Add one or more (work)sheets
sheet_append()
Append rows to a sheet
sheet_copy()
Copy a (work)sheet
sheet_delete()
Delete one or more (work)sheets
sheet_properties() sheet_names()
Get data about (work)sheets
sheet_relocate()
Relocate one or more (work)sheets
sheet_rename()
Rename a (work)sheet
sheet_resize()
Change the size of a (work)sheet
sheet_write() write_sheet()
(Over)write new data into a Sheet

Operate on a range of cells

Functions that can target a cell range

range_autofit()
Auto-fit columns or rows to the data
range_delete()
Delete cells
range_flood() range_clear()
Flood or clear a range of cells
range_read() read_sheet()
Read a Sheet into a data frame
range_read_cells()
Read cells from a Sheet
range_speedread()
Read Sheet as CSV
range_write()
(Over)write new data into a range