我可以将 SharePoint 列表导出到细分为单独工作表的 Excel 文件吗?
我们有一个 SharePoint 2007 部署,它将有一个相当大的文档库。我的客户希望能够将此库导出到 Excel 电子表格,但特别希望能够根据特定字段将电子表格划分为多个工作表。这是否可以在 WSS 3.0 中通过对象模型或其他方式实现?
有一个现成的导出到电子表格,但它似乎不支持将列表项自动细分为单独的工作表。我不知道MOSS附带的Excel Services是否有能力,但我们没有MOSS,所以我们暂时不能考虑它。
编辑
似乎通过提到“开箱即用”,我暗示我更喜欢快速而简单的东西。让我们消除这一点。我在对象模型方面做了很多繁重的工作。我只提到“导出到电子表格”,因为这是我所知道的唯一可用的临时方法,并且其选项有限。因此,我对可以建议的各种工作水平感到满意。
我还应该指出,将列表与电子表格保持链接是不受欢迎的。我们希望能够下载电子表格作为参考。由于将在该列表上工作的人员数量较多,因此尝试同步所有链接的文件绝对会造成混乱。我的客户同意处理过时的副本比尝试一些同步系统更容易。
该解决方案还需要可部署。因此,不适合单个站点的东西是最好的。
We have a SharePoint 2007 deployment which will have a substantially large document library. My client wants the ability to export this library to an Excel spreadsheet, but specifically wants the ability to divide the spreadsheet into several worksheets based on a specific field. Is this possible to accomplish in WSS 3.0, through the object model or otherwise?
There is a out-of-the-box Export to Spreadsheet, but it does not appear to support automated subdivision of the list items into separate worksheets. I do not know if Excel Services that come with MOSS are capable of it, but we do not have MOSS so we cannot consider it an option for now.
EDIT
It seems that by mentioning "out-of-the-box", I am implying that I'd prefer something quick and simple. Let's dispel that. I do a lot of heavy work in the object model. I only mentioned the Export to Spreadsheet because that's the only available method I know of off-hand, and its options are limitted. So I am comfortable with all manner of work level that can be suggested.
I should also note that keeping the list linked with the spreadsheet is undesired. We want to be able to download the spreadsheet as a reference. Because of the number of people who will be working on the list, it would be absolute chaos to try and synchronize all of the linked files. My client has agreed that it'll be easier to handle obsolete copies than to try some synchronized system.
The solution also needs to be deployable. So things which do not tailor to an individual site are best.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您将无法执行此 OOTB 操作。您必须编写一些代码来使用
SharePoint OM - 更好的性能和更丰富的 API,但必须在 Web 前端上运行
Web 服务 - 可以在任何计算机上运行
然后你就可以构建Excel 电子表格可以通过
使用 Excel 对象模型(又名 Automation ) 如果这是从工作站运行的快速拼凑 - 但 Excel 并非设计用于从无人值守的服务器和/或大容量使用,因此您可能还需要查看
第三方组件,例如 SpreadsheetGear 用于生成 Excel 电子表格文件。
You won't be able to do this OOTB. You will have to write some code to iterate through the records of the list either using
The SharePoint OM - Better performance and richer API but has to run on a Web Front End
The web service - Can run on any machine
Then you can build up the Excel spreadsheet either by
Using the Excel object model (aka Automation) if this is a quick kludge running from a workstation - but excel wasn't designed to be used from an unattended server and/or high volume so you may also want to look at
A 3rd party component such as SpreadsheetGear to generate the Excel spreadsheet files.
一个好的选择是快速为您的项目创建视图(根据需要使用过滤器)镜像您所需的工作表,然后将这些视图导出到 Excel 中。这些视图随列表更新,您可以稍后手动获取新版本。仍然是手动的,但 OOTB 并且不需要 Excel 黑客攻击。
A good bet is to quickly create views for your items (using filters as you want) mirroring your desired worksheets and then export those views into excel. Those views update with the list and you can manually grab new versions later. Still manual but OOTB and no excel hacking needed.
我将其发布在 SharePoint Overflow 上。 关于 Open XML SDK 的实用性,我收到的答案非常有用。感谢那些回答的人...我查看了您的建议。我的客户决定采用这一方案,因为它不需要花钱实施(如 Spreadsheet Gear 或 datapresentation 的插件那样)。
I posted this on SharePoint Overflow. One of the answers I received there was very useful, regarding the utility of the Open XML SDK. Thank you to those who answered... I looked over your suggestions. My client has decided to go through with this one on account that it does not cost money to implement (as Spreadsheet Gear or datapresentation's plugin would).