本文介绍了打开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
发布评论