我怎样才能读取服务器MS Office文件,而无需安装MS Office和不使用互操作库? [英] How can I read MS Office files in a server without installing MS Office and without using the Interop Library?
问题描述
互操作的库是缓慢的,需要安装微软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:
- 您可以使用第三方组件如 TX文本控件的Word和的 TMS FLEXCEL工作室为Excel
- 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):
- 您可以做从
System.IO.Packaging程序
使用.NET功能的一些基本的东西。看看如何在 http://msdn.microsoft.com/en-us/library/ bb332058.aspx
- 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):
- 旧的Office格式正在记载: http://www.microsoft.com/互操作性/文档/ officebinaryformats.mspx 。如果你想要做的事真的很容易,你可能会考虑尝试它。但要注意,这些格式是非常复杂的。
- 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屋!