Creates an entirely new (spread)Sheet (or, in Excel-speak, workbook). Optionally, you can also provide names and/or data for the initial set of (work)sheets. Any initial data provided via sheets is styled as a table, as described in sheet_write().

gs4_create(name = gs4_random(), ..., sheets = NULL)



The name of the new spreadsheet.


Optional spreadsheet properties that can be set through this API endpoint, such as locale and time zone.


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. See the examples.


The input ss, as an instance of sheets_id

See also


if (gs4_has_token()) { gs4_create("gs4-create-demo-1") gs4_create("gs4-create-demo-2", locale = "en_CA") gs4_create( "gs4-create-demo-3", locale = "fr_FR", timeZone = "Europe/Paris" ) gs4_create( "gs4-create-demo-4", sheets = c("alpha", "beta") ) my_data <- data.frame(x = 1) gs4_create( "gs4-create-demo-5", sheets = my_data ) gs4_create( "gs4-create-demo-6", sheets = list(iris = head(iris), mtcars = head(mtcars)) ) # clean up gs4_find("gs4-create-demo") %>% googledrive::drive_trash() }
#> Creating new Sheet: gs4-create-demo-1
#> Creating new Sheet: gs4-create-demo-2
#> Creating new Sheet: gs4-create-demo-3
#> Creating new Sheet: gs4-create-demo-4
#> Creating new Sheet: gs4-create-demo-5
#> Creating new Sheet: gs4-create-demo-6
#> Files trashed:
#> gs4-create-demo-6 <id: 1PfCdUK5LMJheT4vvf7OrjUv16wcACWX-ax_TAJZIaVA>
#> gs4-create-demo-5 <id: 1KDRQAB9h5AGeu0DJIXlXYRWEflHu3mdLqfVISkL8944>
#> gs4-create-demo-4 <id: 17vzB1CikWbwEHsDefOSirRzw_YSr6G2ccTQ3W6JQCec>
#> gs4-create-demo-3 <id: 1PKTARFPQrbiamDphkkDWXNTusJJlnmpIJuS8ur1HwkI>
#> gs4-create-demo-2 <id: 1_n1POKi9NoFHL4U1A08eSHhpPYZAbeAmXeM4ZiG0Q9E>
#> gs4-create-demo-1 <id: 18VG2vEf029gETJd0IIgjP8uEA8EI7v3wrkXDeWf8a0k>