tidyverse / googlesheets4

Google Spreadsheets R API (reboot of the googlesheets package)
https://googlesheets4.tidyverse.org
Other
360 stars 53 forks source link

Issue with getting the address to the new spreadsheet #252

Closed dokato closed 2 years ago

dokato commented 2 years ago

I'm trying to get the address of my newly created spreadsheet, but I get this error:

> a = gs4_create("C_report")
Creating new Sheet: "C_report"
> a
Error in with_abort(gs4_get(x)) : could not find function "with_abort"

Expected behaviour: link to the spreadsheet.

> packageVersion("googlesheets4")
[1] ‘0.3.0’
platform       x86_64-apple-darwin17.0     
arch           x86_64                      
os             darwin17.0                  
system         x86_64, darwin17.0          
status                                     
major          4                           
minor          1.0                         
year           2021 
dokato commented 2 years ago

For context: the reason why I need it, is that I want to dynamically create a link to the spreadsheet in a markdown report.

cpilat97 commented 2 years ago

Are you tied to googlesheets4 version 0.3.0 or can you update? The official version on CRAN is 1.0.0, it's possible with a package update might be needed.

cpilat>a <- gs4_create("C_report")
✓ Creating new Sheet: C_report.
cpilat>a
Spreadsheet name: C_report
              ID: 1Y7FJjEQd3qvWZ0vYrrxxaeX5dEZpfnYk63rF7orZ-gc
          Locale: en_US
       Time zone: Etc/GMT
     # of sheets: 1

(Sheet name): (Nominal extent in rows x columns)
      Sheet1: 1000 x 26
cpilat>packageVersion('googlesheets4')
[1] ‘1.0.0’
cpilat>#clean up
cpilat>googledrive::drive_trash(googledrive::as_id(a))
File trashed:
• C_report <id: 1Y7FJjEQd3qvWZ0vYrrxxaeX5dEZpfnYk63rF7orZ-gc>
dokato commented 2 years ago

Thanks @cpilat97 , indeed the new version of the package fixed the problem.