本文介绍了有多少方法可以在C#.NET运行MS Word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有someother方式,使我们能够工作在C#.NET平台MS字。或者说,我们只能用Office.Interop来实现这一目标?

I wish to know is there someother way that allow us to operate MS word in C#.NET platform. Or that we can only use Office.Interop to achieve that?

我到的那种迷茫。你能解释一些技能或资源,我找出一步步。谢谢你。

I am kind of confused to that. Can you explain some skills or resource for me to find out step by step. Thanks.

我能处理互操作自己或通过使用Google。我想知道新的东西给我,这样我就可以找到与你的解释。你知道吗?

I can handle "Interop" myself or by googling it. I wish to know something new to me, so I can find out with your explanation. Any idea?

推荐答案

有几种方法可以使用​​Microsoft Word文档,而办公室和互操作。

There are several ways to operate with Microsoft Word documents without Office and Interop.

  1. 的OpenXML
  2. 在第三方组件

的OpenXML

所有你需要的是 OpenXML的SDK 。有设置.NET类THRE,让您完全操纵或处理OpenXML fomat创建,当然Word文档中, - DOCX。例如Google搜索视频频道9 ,并介绍到OpenXML的链接,你开始和的。

All what you need for it is OpenXML SDK. There are set of .NET classes thre that allows you to completely manipulate or create Word documents, of course in OpenXML fomat - docx. For example googled video on Channel 9 with intro to OpenXML link for you to start, and article about it.

使用的OpenXML被认为是一个低的水平的方法来处理的docx

Using OpenXML is considered as a low level way to manipulate docx

第三方组件

例如,在我的几个项目中,我们已经使用的的。它可以使开发更简单,不仅要处理OpenXML格式的约束,这样你就可以操纵DOC / DOCX。但随着OpenXML的,你有你的code为生产和与第三方你依赖从外部组件,在某些罕见的情况可以产生不是你所期待的完全控制。

For example, on several my projects we have used Aspose components. It can make development easier and is not bound only to OpenXML format, so you can manipulate doc/docx. But with OpenXML you have full control on what your code is producing and with 3rd parties you are depending from external components, that in some rare situations can generate not what you are expecting.

我敢肯定,还有很多其他的第三方。阅读Aspose不过是这样的,我用2生产项目,这似乎是对他们来说已经足够了。

I'm sure there are many other 3rd parties. But Aspose is that, I've used on 2 production projects, and it seems to be good enough for them.

您可以看一下演示。

这篇关于有多少方法可以在C#.NET运行MS Word文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 07:02