自动创建 SharePoint 列表,无需编写任何代码

发布于 2024-09-26 02:03:34 字数 557 浏览 1 评论 0原文

作为产品配置的一部分(安装后),我需要在用户指定的 SharePoint 站点上创建一些 Sharepoint 列表。

仔细研究一下,我似乎需要编写自定义代码来执行此操作,可以使用服务器端 API,如 http://sarangasl.blogspot.com/2009/11/create-sharepoint-list-programmatically.html,或使用 SharePoint 列表 Web 服务。但在这两种情况下,我都需要编写代码来执行此操作。

有没有什么开箱即用的方法可以做到这一点,而无需编写任何代码?我理想的解决方案是创建一个具有适当定义的 XML 文件,然后运行 ​​something (传入 SharePoint 网站 url),然后创建列表,并返回指示成功的状态代码或失败。这样的理想解决方案可能吗?

如果没有,最好/最简单的解决方案是什么?以上两者之一,还是其他?

As part of the configuration of my product (after installation), I need to create a few Sharepoint lists on the SharePoint site specified by the user.

Digging around, it seems that i need to write custom code to do this, either using the server-side API as described at http://sarangasl.blogspot.com/2009/11/create-sharepoint-list-programmatically.html, or using the SharePoint List web services. But in both cases, I need to write code to do this.

Is there any out-of-box way to do this, without writing any code? My ideal solution would be to create an XML file which has the appropriate definition, and then run something (passing in the SharePoint site url), which would then create the list, and return a status code indicating success or failure. Is such an ideal solution possible?

If not, what is the best/easiest solution to do this? One of the two above, or something else?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

骷髅 2024-10-03 02:03:34

创建一个指定ListInstance的功能,当您激活该功能时,将创建列表:
http://msdn.microsoft.com/en-us/library/ms476062.aspx

Create a feature specifying a ListInstance, when you activate the feature, the list will be created:
http://msdn.microsoft.com/en-us/library/ms476062.aspx

波浪屿的海角声 2024-10-03 02:03:34

正如弗拉迪所说,我会选择这个功能。

但您也可以安装 Gary Lapointe 的 STSADM 扩展。它包含一个创建列表的命令。然后,您可以编写一个批处理文件来一次性创建所有列表。

I'd go with the feature as Vladi said.

But you can also install the STSADM extensions from Gary Lapointe. It includes a command to create a list. You can then write a batch file that creates all the lists in 1 go.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文