Skip to content

Reveals full metadata or just the names for the (work)sheets inside a (spread)Sheet.

Usage

sheet_properties(ss)

sheet_names(ss)

Arguments

ss

Something that identifies a Google Sheet:

  • its file id as a string or drive_id

  • a URL from which we can recover the id

  • a one-row dribble, which is how googledrive represents Drive files

  • an instance of googlesheets4_spreadsheet, which is what gs4_get() returns

Processed through as_sheets_id().

Value

  • sheet_properties(): A tibble with one row per (work)sheet.

  • sheet_names(): A character vector of (work)sheet names.

See also

Examples

ss <- gs4_example("gapminder")
sheet_properties(ss)
#> # A tibble: 5 × 8
#>   name     index         id type  visible grid_rows grid_columns data  
#>   <chr>    <int>      <int> <chr> <lgl>       <int>        <int> <list>
#> 1 Africa       0  780868077 GRID  TRUE          625            6 <NULL>
#> 2 Americas     1   45759261 GRID  TRUE          301            6 <NULL>
#> 3 Asia         2 1984823455 GRID  TRUE          397            6 <NULL>
#> 4 Europe       3 1503562052 GRID  TRUE          361            6 <NULL>
#> 5 Oceania      4 1796776040 GRID  TRUE           25            6 <NULL>
sheet_names(ss)
#> [1] "Africa"   "Americas" "Asia"     "Europe"   "Oceania"