Description Usage Arguments Details Value Examples
Export a Google Sheet as a .csv, .pdf, or .xlsx file. You can download a sheet that you own or a sheet owned by a third party that has been made accessible via the sharing dialog options. You can download the entire spreadsheet (.pdf and .xlsx formats only) or a single worksheet (all formats). This function calls the Google Drive API.
1 2 | gs_download(from, ws = NULL, to = NULL, overwrite = FALSE,
verbose = TRUE)
|
from |
a registered Google spreadsheet, i.e. a |
ws |
positive integer or character string specifying index or title, respectively, of the worksheet |
to |
path to write file; file extension must be one of .csv, .pdf, or
.xlsx, which dictates the export format; defaults to |
overwrite |
logical, indicating whether to overwrite an existing local file |
verbose |
logical; do you want informative messages? |
If the worksheet is unspecified, i.e. if ws = NULL
, then the entire
spreadsheet will be exported (.pdf and xlsx formats) or the first worksheet
will be exported (.csv format)
The normalized path of the downloaded file, after confirmed success,
or NULL
, otherwise, invisibly.
1 2 3 4 5 | ## Not run:
gs_download(gs_gap(), to = "gapminder.xlsx")
file.remove("gapminder.xlsx")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.