sp_writeListData: Write data to a SharePoint list

View source: R/sharepoint_list_post.R

sp_writeListDataR Documentation

Write data to a SharePoint list

Description

This method allows to write data to a SharePoint list. Therefore, type checks and lookups will be performed (see details).

Usage

sp_writeListData(con, listName = NULL, listID = NULL, data)

Arguments

con

A SharePoint connection returned by sp_connection()

listName

Name of the SharePoint list to write to

data

List or dataframe of the data to write into the SharePoint list

Details

In order to upload the data correctly, the following data types are casted automatically

  1. Text columns

  2. Numeric columns

  3. User names

  4. DateTime columns

  5. Lookup columns linking to another table

Examples

sp_con = sp_connection("https://yourdomain.sharepoint.com", "YourUsername", "YourPassword", Office365 = T)
sp_writeListData(sp_con, "yourList", list(column1 = "content1", column2 = 2, column3 = 1.23, user = "Username"))

LukasK13/sharepointr documentation built on Jan. 9, 2023, 12:22 p.m.