View source: R/google_sheets.R
| export_google_sheet | R Documentation |
Generates a Google Apps Script file that, when run in a Google Sheet,
creates a response collection endpoint for a survey instrument. The builder
can store the deployed Apps Script URL in survey metadata, and the same
sheet can be read back with read_sheet_responses().
export_google_sheet(instrument, sheet_url, output_dir = ".")
instrument |
An |
sheet_url |
Character. The URL of an existing Google Sheet. The sheet
must be shared so that anyone with the link can edit, or use service
account credentials via |
output_dir |
Character. Directory to write the Apps Script file. Defaults to the current working directory. |
The path to the generated .gs Apps Script file, invisibly.
read_sheet_responses(), read_responses(), write_sframe()
instr <- read_sframe(
system.file("extdata", "tourism_services_demo.sframe",
package = "surveyframe")
)
script <- export_google_sheet(
instr,
sheet_url = "https://docs.google.com/spreadsheets/d/demo",
output_dir = tempdir()
)
file.exists(script)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.