sheets_id is an S3 class that marks a string as a Google Sheet's id, which
the Sheets API docs refer to as
Any object of class
sheets_id also has the
class, which is used by googledrive for the same purpose. This means you
can provide a
sheets_id to googledrive functions, in order to do anything
with your Sheet that has nothing to do with it being a spreadsheet. Examples:
change the Sheet's name, parent folder, or permissions. Read more about using
googlesheets4 and googledrive together in
Note that a
sheets_id object is intended to hold just one id, while the
drive_id can be used for multiple ids.
as_sheets_id() is a generic function that converts various inputs into an
sheets_id. See more below.
When you print a
sheets_id, we attempt to reveal the Sheet's current
gs4_get(). This can fail for a variety of reasons (e.g. if
you're offline), but the input
sheets_id is always revealed and returned,
Something that contains a Google Sheet id: an id string, a
Other arguments passed down to methods. (Not used.)
These inputs can be converted to a
Spreadsheet id, "a string containing letters, numbers, and some special
characters", typically 44 characters long, in our experience. Example:
A URL, from which we can excavate a spreadsheet or file id. Example:
dribble, a "Drive tibble" used by the
googledrive package. In general, a
dribble can represent several
files, one row per file. Since googlesheets4 is not vectorized over
spreadsheets, we are only prepared to accept a one-row
is a great way to look up a Sheet via its name.
gs4_find("YOUR_SHEET_NAME") is another good way
to get your hands on a Sheet.
Spreadsheet meta data, as returned by, e.g.,
this is an object of class
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.