Converts various representations of a Google Sheet into a sheets_id object. Anticipated inputs:

• Spreadsheet id, "a string containing letters, numbers, and some special characters", typically 44 characters long, in our experience. Example: 1qpyC0XzvTcKT6EISywvqESX3A0MwQoFDE8p-Bll4hps.

• A one-row 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 dribble.

• googledrive::drive_get("YOUR SHEET NAME") is a great way to look up a Sheet via its name.

This is a generic function.

as_sheets_id(x, ...)

Arguments

x Something that uniquely identifies a Google Sheet: a sheets_id, URL, or dribble. Other arguments passed down to methods. (Not used.)

Examples

as_sheets_id("abc")#> [1] "abc"
#> attr(,"class")
#> [1] "sheets_id" "drive_id"