将文件从 R 保存到 SharePoint 文件夹 [英] Saving files to SharePoint folder from R

查看:93
本文介绍了将文件从 R 保存到 SharePoint 文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够从 Rshiny 服务器上运行的 R 的 SharePoint 文件夹中打开文件.但是,无法将文件保存到同一文件夹中.我收到如下所示的错误消息.我尝试了此处提供的解决方案 将文件保存到 Sharepoint with R 和这里 将文件复制到 R 中的共享点库 没有运气.有什么建议吗?

I am able to open a file from a SharePoint Folder from R running on Rshiny server. But, not able to save a file to the same folder. I get error message as shown below. I tried the solutions provided here Saving a file to Sharepoint with R and here Copying file to sharepoint library in R with no luck. Any suggestions?

df <- read.csv("http://sites.somecompany.com/sites/sitename/Documents/UserDocumentFolder/filename.csv")

write.csv(df, "http://sites.somecompany.com/sites/sitename/Documents/UserDocumentFolder/filename2.csv")

can only open URLs for readingError in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection

推荐答案

我试过了,它奏效了:

system("curl --ntlm --user username:password --upload-file someFolder/FileToCopy.ext https://sites.somecompany.com/sites/sitename/Documents/UserDocumentFolder/FileToCopy.ext")

这篇关于将文件从 R 保存到 SharePoint 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆