Finds your Google Sheets. This is a very thin wrapper around
googledrive::drive_find()
, that specifies you want to list Drive files
where type = "spreadsheet"
. Therefore, note that this will require auth for
googledrive! See the article Using googlesheets4 with googledrive
if you want to coordinate auth between googlesheets4 and googledrive. This
function will emit an informational message if you are currently logged in
with both googlesheets4 and googledrive, but as different users.
Arguments
- ...
Arguments (other than
type
, which is hard-wired astype = "spreadsheet"
) that are passed along togoogledrive::drive_find()
.
Value
An object of class dribble
, a tibble with one row per file.
Examples
if (gs4_has_token()) {
# see all your Sheets
gs4_find()
# see 5 Sheets, prioritized by creation time
x <- gs4_find(order_by = "createdTime desc", n_max = 5)
x
# hoist the creation date, using other packages in the tidyverse
# x %>%
# tidyr::hoist(drive_resource, created_on = "createdTime") %>%
# dplyr::mutate(created_on = as.Date(created_on))
}
#> # A dribble: 5 × 3
#> name id drive_resource
#> <chr> <drv_id> <list>
#> 1 blubbery-lobo 1foTYXQEknymPpyug1xWOq7ituJ-ywLCaTEHaF2y… <named list>
#> 2 bacciform-booby 15WqCxHBCjY4P_i6-uTL9rUBgpcHRKQFrqheRSSO… <named list>
#> 3 childsafe-squid 1uGu_BHwialVz6okcuO5kRgLhaprClnzq5Orgc9B… <named list>
#> 4 fiery-hart 18KiiL2AGkL9nTkjHdOXGmeUQzqnOLqWnnOIEnWY… <named list>
#> 5 chicken-sheet 1StV8oqHa0SVo58ztLGPH5mDMMHIBsiF6VO5GUJj… <named list>