I'm looking to download all of the sheets in a single google sheet in R.
I'm currently using the gsheet package by [maxconway][1], which allows me to download a sheet using its URL, but it only works on individual sheets, which are differentiated by a gid.
The set of google sheets I'm trying to download has over 100 sheets, which makes downloading them one by one with gsheet massively inconvenient - does anyone know of any R packages that automate this or of any way to loop through all of the sheets in a single google sheet?
Here is the code I currently have which downloads just the first of over 100 sheets as a tibble:
all_rolls <- gsheet2tbl('https://docs.google.com/spreadsheets/d/1OEg29XbL_YpO0m5JrLQpOPYTnxVsIg8iP67EYUrtRJg/edit#gid=26346344')
> head(all_rolls)
# A tibble: 6 x 14
Episode Time Character `Type of Roll` `Total Value` `Natural Value` `Crit?` `Damage Dealt` `# Kills`
<int> <drtn> <chr> <chr> <chr> <chr> <chr> <chr> <int>
1 1 37'53" Vex'ahlia Intelligence 20 18 <NA> <NA> NA
2 1 41'48" Grog Persuasion 19 18 <NA> <NA> NA
3 1 43'25" Keyleth Persuasion 2 2 <NA> <NA> NA
4 1 46'35" Tiberius Persuasion 12 3 <NA> <NA> NA
5 1 46'35" Tiberius Persuasion 27 18 <NA> <NA> NA
6 1 46'35" Percy Assist 21 15 <NA> <NA> NA
# … with 5 more variables: Notes <chr>, `Non-Roll Kills` <chr>, X12 <chr>, X13 <chr>, X14 <chr>
Note: I've tried removing the #gid field, but then it just downloads the first sheet.