This function can upload tabular files to RSpace structured documents. The file needs to have exactly two columns, one with the RSpace structured document fields and one with the content.
Usage
document_create_from_excel(
path,
file_type = NULL,
document_name = NULL,
template_id = NULL,
folder_id = NULL,
tags = NULL,
attachment = NULL,
api_key = get_api_key(),
existing_document_id = NULL
)
Arguments
- path
tabular file to upload. Can be XLSX, CSV or TSV
- file_type
an optional character string to specify the file type. Will be guessed from the file name if not specified.
- document_name
specify the name of the RSpace entry. If not specified, it will be the value in Title, Name, title, or name if that is one of the fields in the Excel document. If that does not exist, it will be the file name.
- template_id
document id of the RSpace template used
- folder_id
folder_id in which the document will be created (can be a notebook)
vector of tags to apply to the document
- attachment
attachment to attach to one of the fields, e.g.,
list(field = 7, path = "file.txt")
- api_key
RSpace API key
- existing_document_id
if you want to replace a document by a new one, specify the current identifier here.