A sheets_id is a spreadsheet identifier, i.e. a string. This is what the Sheets and Drive APIs refer to as spreadsheetId and fileId, respectively. When you print a sheets_id, we attempt to reveal its current metadata (via gs4_get()). This can fail for a variety of reasons (e.g. if you're offline), but the sheets_id is always revealed and is returned, invisibly.

Any object of class sheets_id will also have the drive_id class, which is used by googledrive for the same purpose. This means you can pipe a sheets_id object straight into googledrive functions for all your Google Drive needs that have nothing to do with the file being a spreadsheet. Examples: examine or change file name, path, or permissions, copy the file, or visit it in a web browser.

See also

Examples

if (gs4_has_token()) { gs4_example("mini-gap") }
#> Spreadsheet name: mini-gap #> ID: 1k94ZVVl6sdj0AXfK9MQOuQ4rOhd1PULqpAu2_kr9MAU #> Locale: en_US #> Time zone: America/Los_Angeles #> # of sheets: 5 #> #> (Sheet name): (Nominal extent in rows x columns) #> Africa: 6 x 6 #> Americas: 6 x 6 #> Asia: 6 x 6 #> Europe: 6 x 6 #> Oceania: 6 x 6