打开xlsx文件时出现HRESULT异常:0x80010105(RPC_E_SERVERFAULT) [英] Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT) when opening xlsx file

查看:623
本文介绍了打开xlsx文件时出现HRESULT异常:0x80010105(RPC_E_SERVERFAULT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个让我疯狂的例外。

I have this exception that is driving me crazy.

当我尝试以这种方式打开.xlsx文件时

When I try to open a .xlsx file this way

Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application(); string v = "path\File.xlsx"; Workbook wb = app.Workbooks.Open(v); //This triggers the exception app.Visible = true; Worksheet sh = wb.Sheets[1];

我有这个例外

I have this exception

Error: System.Runtime.InteropServices.COMException (0x80010105): Server launches an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
at Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object 
at MainWindow.loadFile(String v) in MainWindow.cs:line 139


推荐答案

某些计算机无法运行,其他计算机可以
Some computers can't run, others can


这篇关于打开xlsx文件时出现HRESULT异常:0x80010105(RPC_E_SERVERFAULT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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