gs4_create_at: Create Google Sheet at Specified Location

Description Usage Arguments Value Examples

View source: R/google.R

Description

Calls gs4_create() then move file to specified location with drive_mv()

Usage

1
2
3
4
5
6
7
gs4_create_at(
  path = NULL,
  name = gs4_random(),
  sheets = NULL,
  overwrite = NA,
  ...
)

Arguments

path

Specifies target destination for the file on Google Drive. Can be an actual path (character), a file id marked with as_id(), or a dribble.

name

The name of the new spreadsheet.

sheets

Optional input for initializing (work)sheets. If unspecified, the Sheets API automatically creates an empty "Sheet1". You can provide a vector of sheet names, a data frame, or a (possibly named) list of data frames.

overwrite
  • NA (default): Just do the operation, even if it results in multiple files with the same filepath.

    • TRUE: Check for a pre-existing file at the filepath. If there is zero or one, move a pre-existing file to the trash, then carry on. Note that the new file does not inherit any properties from the old one, such as sharing or publishing settings. It will have a new file ID. An error is thrown if two or more pre-existing files are found.

    • FALSE: Error if there is any pre-existing file at the filepath.

...

to gs4_create(): Optional spreadsheet properties that can be set through this API endpoint, such as locale and time zone.

Value

Object class: "sheets_id", "drive_id"

Examples

1
# gs4_create_at("folder_name", name = "file_name", sheets = "sheet_name")

Lightbridge-AI/lbr documentation built on Dec. 27, 2021, 8:09 p.m.