使用 C# 读取 Word 2007 表格

发布于 2024-08-08 11:35:31 字数 145 浏览 0 评论 0原文

我对 Word 2007 编程还比较陌生。如果这个问题已经被问过,请原谅我。我想读取单词表及其子单元格,并在 C#(VSTO 工具)中提取该文本。我想稍后从数据提取中构建一个 xml。

如果有人做过此类事情,请指导我。真的很感激。

谢谢。 安坚

I am relatively new in Word 2007 programming. Pardon me if this question is already asked. I would like to read a word table and its child cells and extract that text out in C# (VSTO tools). I would like to build out an xml from the data extract later.

Please guide me if anyone has done something of this sort. Would really appreciate.

Thank you.
Anjan

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

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

发布评论

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

评论(1

时光病人 2024-08-15 11:35:31

除非在向后兼容模式下使用,否则 Word 2007 会生成“Office Open XML 格式”文档,Microsoft 在 .NET 中为此提供了一个库

MSDN 文章 提供了有关如何执行此类操作的各种 C# 指针和片段。此外,此演练 Word 2007 格式可能很有用。

如果您需要访问较旧的 MS-Word 格式,您可以使用 文本挖掘开源项目(java)。

Unless used in backward compatibility mode, Word 2007 produces documents in the "Office Open XML Format" for which Microsoft provides an library in .NET

This MSDN article provides various pointers and snippet, in C#, on how to do this kind of things. Also this Walkthough Word 2007 format may be useful.

If you need to access older MS-Word formats, you may be able to use or inspire yourself from the text-mining open source project (java).

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