无法加载文件或程序集"Office,版本= 15.0.0.0" [英] Could not load file or assembly 'Office, Version=15.0.0.0'

查看:113
本文介绍了无法加载文件或程序集"Office,版本= 15.0.0.0"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Vs2013.我创建了一个应用程序,其中使用Excel文件作为输入并从文件中获取联系.一切都在我的计算机上工作.我有Vs2013.Windows 8.1,Office 2007和Ms;2013.
当我在其他任何计算机上运行应用程序时,都会抛出

I use Vs2013. I have created application in which I use Excel file as an input and get contact from the file. Everything is working in my computer. I have Vs2013. Windows 8.1, Ms office 2007 & 2013.
When I run my application in any other computer, it throws

无法加载文件或程序集办公室,版本= 15.0.0.0,区域性=中性,PublicKeyToken = 71e9bc111e9429c"或其依赖项之一.系统找不到指定的文件

Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bc111e9429c' or one of its dependencies. The system cannot find the file specified

根据我的应用程序要求,我需要使用Office 2007至2013年的Excel文件.

As per my application requirement, I need to use Excel file from Office 2007 to 2013.

我已经介绍了几个StackOverflow链接,但没有得到结果.我被困住了.请建议我如何解决此问题.

I have referred few StackOverflow links but I am not getting result. I am stuck. Please suggest me how to solve this.

推荐答案

您的其他计算机需要安装相应版本的Office.15.0.0.0应对应于Office 2013-需要在目标计算机上安装(其他版本的Office可能无法正常工作).几乎可以肯定,这意味着您正在使用MSOffice互操作库,该库仅在安装了Office且针对相同版本的情况下才有效.

Your other machine needs to have the corresponding version of Office installed. 15.0.0.0 should correspond to Office 2013 - that needs to be installed on your target machine (other versions of Office may not work). This almost certainly means you're using MSOffice interop libraries, which only work if office is installed and against the same version.

或者,您可以重构代码以直接读取Excel XML.

Alternatively, you could refactor your code to just directly read the Excel XML.

这篇关于无法加载文件或程序集"Office,版本= 15.0.0.0"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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