I'm trying to bring in an excel
file into R
that is located on a secure company SharePoint site. So far, I have tried using RCurl
to do this, and this is the code I have currently:
library(RCurl)
curl = getCurlHandle()
curlSetOpt(cookiejar = "cookies.txt",.opts = list(proxy = "proxy", proxyuserpwd = "username:password",
proxyauth = "ntlm"), curl = curl, useragent = "Mozilla/5.0", followlocation = TRUE)
content <- getURL("URL",
curl = curl, httpauth = 1L, ssl.verifypeer = FALSE, verbose = TRUE , userpwd = "username:password")
After running this code, content contains html code from the SharePoint site. However, I do not know if this is what I want.
I want to be able to access the excel document and possibly bring it into a data frame in R
. I know you can do this using XLConnect
, but I am not sure if you can use XLConnect
to pull a document from a secure webpage. Does anyone know how to solve this issue?