如何使用 VBA 读取安全的共享点目录?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5450469/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 12:54:11  来源:igfitidea点击:

How do I read a secure sharepoint directory with VBA?

excelvbasharepointhttps

提问by Aeonaut

I'm trying to write a macro to connect to an https sharepoint directory and read the list of files contained within the directory (so that I can parse the filenames and then open the appropriate one and read some data from it).

我正在尝试编写一个宏来连接到 https 共享点目录并读取该目录中包含的文件列表(以便我可以解析文件名,然后打开相应的文件名并从中读取一些数据)。

So far I've tried:

到目前为止,我已经尝试过:

Has anyone had success with this on a secure https sharepoint directory??

有人在安全的 https 共享点目录上成功了吗?

回答by Karel

Sharepoint exposes webservices. You can use these to iterate through your libraries.

Sharepoint 公开网络服务。您可以使用这些来迭代您的库。

http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx

http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx

Sharepoint 2010 also provides the managed Client Object Model.

Sharepoint 2010 还提供托管客户端对象模型。

This will do what you want: http://msdn.microsoft.com/en-us/library/aa159897(v=office.11).aspx

这将执行您想要的操作:http: //msdn.microsoft.com/en-us/library/aa159897(v=office.11​​).aspx

回答by Mark Mascolino

If the files you want are in a document library, you could use WebDAV to get access to them via something like: \sp.example.com\sites\thesite\doclib\foldername

如果您想要的文件在文档库中,您可以使用 WebDAV 通过以下方式访问它们:\sp.example.com\sites\thesite\doclib\foldername