打开xlsx文件时出现HRESULT异常:0x80010105(RPC

编程入门 行业动态 更新时间:2024-10-25 18:24:45
本文介绍了打开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

本文发布于:2023-11-06 01:40:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1562398.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常   文件   xlsx   HRESULT   RPC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!