I am trying to access an Excel file from my company's Sharepoint site. I've looked into all the answers on Stack Overflow regarding R and Sharepoint and came up empty handed.
This currently works for me:
r <- GET("http://company.SharepointSite.com/Test.xlsx", authenticate("user", "pswd", "ntlm"))
However, I have no idea how to get this into a data frame. Moreover, I really would like this to work for files with the .xlsb extension.
Now, when I tried this:
sharepoint_data <- read.table(
text = getURL(
csv_url,
userpwd = paste0(username, ":", password)
),
header = TRUE,
sep = ","
)
I get a X401 Unauthorized error
Any help would be much appreciated.