我怎样才能读取服务器MS Office文件,而无需安装MS Office和不使用互操作库? [英] How can I read MS Office files in a server without installing MS Office and without using the Interop Library?

查看:218
本文介绍了我怎样才能读取服务器MS Office文件,而无需安装MS Office和不使用互操作库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

互操作的库是缓慢的,需要安装微软Office。
很多时候,你不想在服务器上安装微软Office。

The interop library is slow and needs MS Office installed. Many times you don't want to install MS Office on servers.

我想使用的Apache POI ,但我在.NET。

I'd like to use Apache POI, but I'm on .NET.

我只需要解压缩文件的文本部分,没有创造也不Office文件储存信息。

I need only to extract the text portion of the files, not creating nor "storing information" in Office files.

我要告诉你,我有一个非常大的文档库,我不能将其转换为新的XML文件。

I need to tell you that I've got a very large document library, and I can't convert it to newer XML files.

我不想写一个解析器的二进制文件。
如Apache POI库做到这一点对我们来说。不幸的是,这只是为Java平台。也许我应该考虑用Java编写这个应用程序。

I don't want to write a parser for the binaries files. A library like Apache POI does this for us. Unfortunately, it is only for the Java platform. Maybe I should consider writing this application in Java.

我仍然没有找到在.NET的开源替代品POI,我想我会用Java写我自己的应用程序。

I am still not finding an open source alternative to POI in .NET, I think I'll write my own application in Java.

推荐答案

对于所有MS Office版本:

For all MS Office versions:

  • You could use the third-party components like TX Text Controls for Word and TMS Flexcel Studio for Excel

有关新的Office(2007):

For the new Office (2007):

  • You could do some basic stuff using .net functionality from system.io.packaging. See how at http://msdn.microsoft.com/en-us/library/bb332058.aspx

对于旧办公室(2007年之前):

For the old Office (before 2007):

  • The old Office formats are now documented: http://www.microsoft.com/interop/docs/officebinaryformats.mspx. If you want to do something really easy you might consider trying it. But be aware that these formats are VERY complex.

这篇关于我怎样才能读取服务器MS Office文件,而无需安装MS Office和不使用互操作库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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