使用 ASP.NET/C# 读取 Word 2007 文件并提取文本、注释和评论者姓名
我有一个允许上传 Word 2007 文档的 ASP.NET 应用程序。 上传后,我想解析文档文本以及审阅者提出的任何评论。 我希望能够获得评论和评论者姓名缩写/姓名。
有免费的库可以做到这一点吗? 我不喜欢将 Word 自动化,因为这个过程需要具有一定的可扩展性。
I have an ASP.NET app that permits Word 2007 document uploads. Once they are uploaded I'd like to parse out the document text and also any comments made by reviewers. I'd like to be able to get the comments and the commenter initials/name.
Are there free libaries to do this? I prefer not to automate Word as this process needs to be somewhat scalable..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DocX(检查 codeplex)可能会满足您的需要。 我知道您正在寻找免费产品,但如果您发现您需要的功能(例如 97-2003 支持)比免费产品中提供的功能更多,请查看 Aspose 的产品。 我依赖他们的 .NET 套件来开发许多商业应用程序,总体而言,我对此非常满意。
DocX (check codeplex) might do what you need. I know you are looking for free, but if you find that you need more features (97-2003 support, for example) than you can find in free offerings, take a look at Aspose's products. I rely on their .NET suite for a number of commercial apps and have been, overall, very happy with it.
如果您要求用户上传 Word 2007 DOCX 文件(而不是 Word 2003 .doc 文件),您可以使用 WindowsBase.dll 中的
System.IO.Packaging
API 读取 Word 中的 XML 2007 文件(请参阅此处)If you require that your users upload Word 2007 DOCX files (as opposed to Word 2003 .doc files), you can use the
System.IO.Packaging
API in WindowsBase.dll to read the XML within the Word 2007 file (See here)