ss_write_sheet {smartsheetr}R Documentation

Create a sheet

Description

Creating a sheet requires either a template or a set of columns (see https://smartsheet.redoc.ly/tag/sheets#operation/create-sheet-in-sheets-folder). This function only allows for the columns option.

Usage

ss_write_sheet(
  sheet_name,
  data = data.frame(PK = character()),
  use_rownames = FALSE
)

Arguments

sheet_name

A character vector

data

A data frame

use_rownames

Logical; whether to use the rownames as the Primary Column

Details

The Smartsheet API 2.0 uses two calls for creating a sheet with data. The first is a call to create a sheet and populate the columns (analogous to ss_write_sheet_columns). The second is to add rows (analogous to ss_add_rows). ss_write_sheet accomplishes both of these steps.

Value

A smartsheetr response object

Examples

## Not run: 
ss_id = ss_sheetid(ss_write_sheet(paste0("smartsheetr-example-",random_sheet_name()), data=mtcars))
ss_read_sheet(ss_id)
# clean up
ss_delete_sheet(ss_id)

## End(Not run)


[Package smartsheetr version 0.1.0 Index]