操作Word文档的服务器,而无需安装Office(ASP.NET) [英] Manipulating Word documents on server without Office installed (ASP.NET)

查看:587
本文介绍了操作Word文档的服务器,而无需安装Office(ASP.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个code键使MS Word中的HTML系统。 googleing大约半分钟后,我能够找到code这不正是我需要的。现在..它的ASP.NET开发服务器上脱机工作,但是当我上传我的服务器上的文件将无法正常工作。

I'm working on a code to make a MS Word to HTML system. After googleing for about half a minute, I was able to find the code which does exactly what I need. Now.. It works offline on the ASP.NET development server, but it won't work when I upload the files on my server.

我看了几个帖子,问题似乎是becouse的服务器没有安装在其上的MS Office。现在,我不知道如果有,我仍然avaiting从好心人的电子邮件@托管(但我认为它没有安装的),但我的问题是...

I read a couple of posts, and the problem seems to be becouse the server does not have MS Office installed on it. Now, i'm not sure if it has, i'm still avaiting an email from the good people @ hosting (but i assume it's not installed), but my question is...

有没有办法让它不装个MS Office的工作什么办法?
我使用的Microsoft.Office.Interop.Word版本。 12. / ASP 3.5 / C#和我得到的误差

Is there ANY way to make it work without th MS Office installed? I'm using Microsoft.Office.Interop.Word ver. 12. / ASP 3.5 / C# and the error I'm getting is

无法加载文件或程序
  '的Microsoft.Office.Interop.Word,
  版本= 12.0.0.0,文化=中立,
  公钥= 71e9bce111e9429c或
  它的一个依赖。

Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies.

感谢您的时间!

推荐答案

互操作的库不是一个工作图书馆本身,它只有大约为WINWORD.EXE .NET程序的包装,所以使用这个库不任何意义,如果你不安装或使用Microsoft Word。

The Interop library is not a "working" library in itself, it is only a wrapper around winword.exe for .NET programs, so using this library does not make any sense if you don't install or use Microsoft Word.

相反,你需要找到一个库,允许用于操纵Word文档。如果你能约束文件,在新的格式(DOCX),那么这将是一个相当简单的任务,例如使用OOXML SDK (所建议的Stilgar,太)。但也有旧格式库了。

Instead you will need to find a library that allows for manipulating Word Documents. If you can constrain the documents to be in the new format (docx), then it will be quite an easy task, e.g. using the OOXML SDK (as proposed by Stilgar, too). But there are libraries for the old format, too.

更新:我不得不承认,虽然我确信我搜索,发现了一些库以前的老doc格式,我不设法找到这些了,可能是因为结果列表是宠坏了许多提供DOCX。需要明确的是:

Update: I have to admit, although I was convinced I searched and found some libraries for the old doc format before, I do not manage to find those anymore, probably because the result lists is "spoiled" by the many offers for docx. To be clear:

如果你能负担得起坚持DOCX(2007或更高版本)格式,你应该做的。的Office Open XML是根据邮递和XML一个(或多或少)开放标准,并且许多工具已经存在,并且将在未来进行开发。旧的格式更支持时下

If you can afford to stick to docx (2007 or later) format, you should do that. Office Open XML is a (more or less) open standard based on ZIP and XML, and many tools already exist and will be developed in the future. The old format is much less supported nowadays.

如果你必须去为旧格式,也再<一个href=\"http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx\">Aspose (所建议的乌韦)是我发现的唯一库。

If you have to go for the old format, too, then Aspose (as proposed by Uwe) is the only library I found.

这篇关于操作Word文档的服务器,而无需安装Office(ASP.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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