Does googlesheets4 replace googlesheets? Or just supplement it

I have just started to look at googlesheets4 having used googlesheets for a specific application.
Is the intention that googlesheets4 replace googlesheets? Or just supplement it.

In the example code below I create a new sheet using googlesheet.
The result makes it easy to get to the URL (which I pass on for users). That URL comes in 2 forms:

  1. Base googlesheet eg
  2. Specific sheet within the googlesheet (ie workbook) eg This is fact is a cheat as gid 0 is just the default but easy enough to get the gid of the first and subsequent sheets

Then using googlesheets4 I seem to only be able to get the URL via googledrive and then it is in a different format.
I can get the gid of the first and subsequent sheets using sheet_properties.
But nothing to quickly get URLs using googlesheets4

And how can I get sheet_write to use a googlesheet name of my choice without using drive_rename?

Have spent a while on this so hope the questions are valid



# use googlesheets

googlesheetsid <- gs_new("starwars1", ws_title = "starwars1 sheet1", input = starwars,
              trim = TRUE, verbose = FALSE)

print(googlesheetsid$ws %>% filter(ws_title == "starwars1 sheet1") %>% pull(visualizationApi))

# use googlesheets4

googlesheets4id <- sheet_write(starwars, ss = NULL, sheet = "starwars4 sheet1")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.