download_sp_list() downloads a SharePoint list to a CSV or XLSX file.
keep_list_cols is intended to allow the preservation of list columns but it
is not yet supported.
Usage
download_sp_list(
...,
new_path = "",
sp_list = NULL,
fileext = "csv",
keep_list_cols = c("createdBy", "lastModifiedBy"),
call = caller_env()
)Arguments
- ...
Arguments passed on to
get_sp_listlist_name,list_idSharePoint List name or ID string.
as_data_frameIf
TRUE, return a data frame with a "ms_list" column.get_sp_list()returns a 1 row data frame andlist_sp_lists()returns a data frame with n rows or all lists available for the SharePoint site or drive. Defaults toFALSE. Ignored ismetadata = TRUEas list metadata is always returned as a data frame.metadataIf
TRUE,get_sp_list()applies theget_column_infomethod to the returned SharePoint list and returns a data frame with column metadata for the list.drive_name,drive_idSharePoint Drive name or ID passed to
get_drivemethod for SharePoint site object.driveA
ms_driveobject. Ifdriveis supplied,drive_nameanddrive_idare ignored.site_urlA SharePoint site URL in the format "https://[tenant name].sharepoint.com/sites/[site name]". Any SharePoint item or document URL can also be parsed to build a site URL using the tenant and site name included in the URL.
siteA
ms_siteobject. Ifsiteis supplied,site_url,site_name, andsite_idare ignored.
- new_path
Optional path to new file. If not
new_pathprovided, the file name is pulled from the name of the SharePoint list using the providedfileext. Ifnew_pathis provided,fileextis ignored.- sp_list
SharePoint list object. If supplied, all parameters supplied to
...are ignored.- fileext
File extension to use for output file. Must be
"csv"or"xlsx".- keep_list_cols
Column names for those columns to maintain in a list format instead of attempting to convert to a character vector.
- call
The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.