library("googledrive") library("googlesheets") library("dplyr") library("readr")
Push a table into a Sheet.
Try to read it as another user Assume you even have the key. You will fail.
Now, as the user who owns the Sheet, publish it.
Now, as the other user, try again to read it via googlesheets. You should succeed.
drive_auth("drive-token.rds") file <- drive_upload( R.home('doc/BioC_mirrors.csv'), type = "spreadsheet" )
drive_show_publish(file)
url <- drive_share_link(file) url
file
key <- file$id
gs_auth("sheets-token.rds")
try(gs_url(url, visibility = "private", lookup = FALSE)) geterrmessage()
file <- drive_publish(file) drive_show_publish(file)
gs_url(url, lookup = FALSE)
check again that the access - it is not shared, but it is published.
promote(file, "shared")
drive_rm(file)
file <- drive_upload( R.home('doc/BioC_mirrors.csv'), type = "spreadsheet" )
file <- drive_share(file, role = "reader", type = "anyone")
url <- drive_share_link(file) url
gs_url(url, visibility = "private", lookup = FALSE)
It is not published, but it is shared.
file <- drive_show_publish(file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.