[英]is there any way to programatically download data list from sharepoint into excel
we have some data (list) stored in sharepoint. 我们有一些存储在sharepoint中的数据(列表)。 i can manually click "Actions"-> "Export to Spreadsheet" and then run a bunch of code on the Excel output. 我可以手动单击“操作” - >“导出到电子表格”,然后在Excel输出上运行一堆代码。
I now want to do this on a daily basis from a C# application . 我现在想从C#应用程序每天这样做。 Is there anyway to programatically automated that download steps that i am doing now. 无论如何以程序方式自动化下载我现在正在做的步骤。 (the site DOES require authentication) (该网站需要验证)
the "Export to Spreadsheet" fires off some javascript (so doesn't directly just point to a URL so i can read in a URL directly (i dont think) “导出到电子表格”会触发一些javascript(所以不直接指向一个URL,所以我可以直接在URL中读取(我不认为)
I would recommend getting the data using SharePoint web services and then using NPOI to convert the data into an excel spreadsheet; 我建议使用SharePoint Web服务获取数据 ,然后使用NPOI将数据转换为Excel电子表格; Use web services so that you are not limited to running the app on the server and NPOI for reading/writing to excel. 使用Web服务,这样您不仅可以在服务器上运行应用程序,还可以使用NPOI来读取/写入Excel。
if you are not limited to excel and can use other office products, MS-Access 2007 has a very good integration with sharepoint. 如果您不仅限于excel并且可以使用其他办公产品,那么MS-Access 2007与sharepoint的集成非常好。 you can write your macro and vb scripts to run on that with minor adjustments. 您可以编写宏和vb脚本来进行微调。
you can also use it as a transfer application, if you build a simple EXPORT TO EXCEL macro, and then set it to run periodically. 您也可以将它用作传输应用程序,如果您构建一个简单的EXPORT TO EXCEL宏,然后将其设置为定期运行。
Basic approach: One you have created the spreadsheet with "Export to Spreadsheet" in SharePoint, the excel file holds a list which is linked to the sharepoint list. 基本方法:您在SharePoint中使用“导出到电子表格”创建了电子表格,excel文件包含一个链接到共享点列表的列表。
This is a list object in Excel which allows for refresh from the same SharePoint list at a later date, make changes in excel and update the SharePoint list from these. 这是Excel中的列表对象,允许在以后从同一SharePoint列表进行刷新,在Excel中进行更改并从中更新SharePoint列表。 So updating your download is really a refresh of the list which you originate in Excel 因此,更新下载实际上是刷新您在Excel中生成的列表
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.