读取没有互操作库的.doc文件 [英] read .doc file without interop library

查看:69
本文介绍了读取没有互操作库的.doc文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我想在不使用COM库的情况下阅读Ms .doc文件。有没有其他方法来读取文件。我的主机没有安装Office。



谢谢

Hello,

I want to read Ms .doc file without using COM library. Is there any other way to read file. My hosting do not have Office installed.

Thanks

推荐答案

是的,你有开放办公室,但你需要在4.0框架中开发应用程序.IT有新的openllice dll,不需要在机器上安装COM组件和办公室

http://msdn.microsoft.com/en-us/ library / office / aa338205(v = office.12).aspx
Yes you have open office but you need to develop application in 4.0 framework.IT have new dll of openoffice which not need to have COM component and office installed on machine
http://msdn.microsoft.com/en-us/library/office/aa338205(v=office.12).aspx


你最好不能使用专有的.DOC,而是使用基于XML的.DOCX。



在这种情况下,您可以在没有Office的情况下使用Open XML SDK: http://www.microsoft.com/en-us/download/details.aspx?id=5124 [ ^ ]。



它根本不需要Office。



有关格式的背景,请参阅:

http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats [ ^ ],

http://en.wikipedia.org/wiki/ Office_Open_XML [ ^ ]。



此外,还有第三方项目使用此功能,甚至使用传统格式(.DOC)。请查看我过去的答案:

将Office文档转换为PDF而不互操作 [ ^ ],
需要一个相当独特的WPF文本编辑器控件 [ ^ ],

您好如何使用c#.net 在Windows应用程序中显示word文件[ ^ ],

阅读没有使用Interop.word dll的word文件...不想在IIS中安装单词。 [ ^ ]。



另一种选择:http://npoi.codeplex.com/ [ ^ ]。



你有一些不错的选择。祝你好运!



-SA
It's the best of you could use not with proprietary .DOC, but with XML-based .DOCX.

In this case, you can do it without Office, is you use Open XML SDK: http://www.microsoft.com/en-us/download/details.aspx?id=5124[^].

It does not require Office at all.

For the background on the format, please see:
http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats[^],
http://en.wikipedia.org/wiki/Office_Open_XML[^].

Also, there are third-party project working with this and even with legacy formats (.DOC). Please see my past answers:
Convert Office-Documents to PDF without interop[^],
Need a rather unique WPF text editor control[^],
Hi how can i display word file in windows application using c#.net[^],
Read a word file without using Interop.word dll...Do not want to install word in IIS..[^].

One more alternative: http://npoi.codeplex.com/[^].

You have some good choices. Good luck!

—SA


你可以尝试以下网址U获得解决方案< br $>


http://www.neowin.net/forum/topic/316480-c-reading-text-from-ms-word-files/ [ ^ ]
U can try this below URL U Got the Solution

http://www.neowin.net/forum/topic/316480-c-reading-text-from-ms-word-files/[^]


这篇关于读取没有互操作库的.doc文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆