【问题标题】:install Office Interops without Office on the server在服务器上安装不带 Office 的 Office Interops
【发布时间】:2012-02-07 18:46:46
【问题描述】:

我正在使用 Excel Interop 更改 excel 单元格。

我尝试了许多开源解决方案,但文件在读取时损坏。因此,我坚持使用 Excel Interop。

在服务器上开发的时候遇到了这个问题:

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

因此,我想在我的服务器上安装 Office 互操作:http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=18346

但是,当我安装它时,我遇到了这个问题:

“请在安装此产品之前安装 Microsoft Office 2007”

我的问题是:是否可以在服务器上安装没有 office 2007 的互操作?

提前致谢。

【问题讨论】:

    标签: excel interop


    【解决方案1】:

    不,这是不可能的。 Office Interop 只是访问 (COM) Office 组件的一种 .NET 方式。所以他们必须在那里,否则 Office Interop 没有理由在那里。

    如果您想开发读/写 Office 文件的应用程序,您可以使用 OpenXML(另请参阅 http://en.wikipedia.org/wiki/Office_Open_XML)和非官方的 ClosedXML (http://closedxml.codeplex.com/) 或第三方组件,例如SmartXLS (http://www.smartxls.com/)。

    【讨论】:

    • 感谢您的明确答复!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多