The above approaches did not work for me. However, the approach below works for me. First, I went on a SharePoint list and I clicked on "extract as excel file" which generated a ".iqy" file. An example of the content of the ".iqy" file is in the text variable below. I added some X where I needed to hide the information. The approach is simple. Basically, you first create a temporary ".iqy" file. After, you open the ".iqy" file with Excel which automatically extracts the information of the SharePoint list and saves the information in the Excel Sheet. Afterwards, you simply need to extraction the information from the Excel file.
library(RDCOMClient)
library(openxlsx)
xlApp <- COMCreate("Excel.Application")
xlApp[["DisplayAlerts"]] <- FALSE
xlApp[["Visible"]] <- TRUE
text <- c("WEB", "1",
"https://xxx.sharepoint.com/sites/xxx/_vti_bin/owssvr.dll?XMLDATA=1&List=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&View=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&RowLimit=0&RootFolder=",
"", "Selection=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"EditWebPage=", "Formatting=None", "PreFormattedTextToColumns=True", "ConsecutiveDelimitersAsOne=True",
"SingleBlockTextImport=False", "DisableDateRecognition=False", "DisableRedirections=False",
"SharePointApplication=https://xxxx.sharepoint.com/sites/xxxx/_vti_bin",
"SharePointListView=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "SharePointListName=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"RootFolder=")
temp_IQY_File <- tempfile(fileext = ".iqy")
fileConn <- file(temp_IQY_File)
writeLines(text, fileConn)
close(fileConn)
temp_Excel_File <- gsub(pattern = ".iqy", replacement = ".xlsx", x = temp_IQY_File)
xlWbk <- xlApp$Workbooks()$Open(temp_IQY_File)
xlWbk$SaveAs(temp_Excel_File)
df <- openxlsx::read.xlsx(temp_Excel_File)