System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况 问题的解决
2017-01-09 15:02
561 查看
System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况。 (异常来自 HRESULT:0x80010105 (RPC_E_SERVERFAULT))
出现此问题是C#调用Microsoft.Office.Interop.Excel 导出excel时提示此错误。
但是在安装360和某pdf阅读器前都可以正常导出。
解决此问题时,可在调用open前设置xapp.Visible=true;
xapp.Visible=true;
Excel.Workbook workBook = xapp.Workbooks.Open(fileName, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value);
这样就可以导出。但是在界面中显示效果不好,一闪一闪的。于是放弃此种方法。
然后就是卸载360,再试还是那个问题;卸载此pdf阅读器,然后卸载不了了,还提示要关闭excel后才能卸载。发现进程中有个excel进程,结束之。接着卸载提示Runtime Error (at 312:454) Could not call proc.
于是只能强制卸载了,删程序所在的目录下的文件。再在注册表里删除相关的东西,查找foxit相关的 。删完重启了下。
然后可以正常导出了。
出现此问题是C#调用Microsoft.Office.Interop.Excel 导出excel时提示此错误。
但是在安装360和某pdf阅读器前都可以正常导出。
解决此问题时,可在调用open前设置xapp.Visible=true;
xapp.Visible=true;
Excel.Workbook workBook = xapp.Workbooks.Open(fileName, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value);
这样就可以导出。但是在界面中显示效果不好,一闪一闪的。于是放弃此种方法。
然后就是卸载360,再试还是那个问题;卸载此pdf阅读器,然后卸载不了了,还提示要关闭excel后才能卸载。发现进程中有个excel进程,结束之。接着卸载提示Runtime Error (at 312:454) Could not call proc.
于是只能强制卸载了,删程序所在的目录下的文件。再在注册表里删除相关的东西,查找foxit相关的 。删完重启了下。
然后可以正常导出了。
相关文章推荐
- System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况。 (异常来自 HRESULT:0x80010105 (RPC_E
- System.Runtime.InteropServices.COMException: 服务器出现意外情况
- 解决System.Runtime.Interopservices.COMException问题
- 完美解决“换另一台电脑上用VS2008继续开发web项目时出现“System.Runtime.InteropServices.COMException”,然后是加载不了项目。”
- 解决System.Runtime.Interopservices.COMException问题
- 完美解决“换另一台电脑上用VS2008继续开发web项目时出现“System.Runtime.InteropServices.COMException”,然后是加载不了项目。”
- “System.Runtime.InteropServices.COMException”解决之道
- System.Runtime.InteropServices.COMException的解决方法
- 关于System.Runtime.InteropServices.COMException (0x80070006): 句柄无效的问题
- System.Runtime.InteropServices.COMException的解决方法
- System.Runtime.InteropServices.COMException: 检索 COM 类工厂中 CLSID 为 {0002E510-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80040154
- System.Runtime.InteropServices.COMException (0x800706BA) 解决方法
- System.Runtime.InteropServices.COMException 检索COM类工厂中CLSID{xxxxxxxxx}的组件时失败解决方法
- “System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务”解决方法
- System.Runtime.InteropServices.COMException 检索COM类工厂中CLSID{xxxxxxxxx}的组件时失败解决方法
- 文档管理系统 之一 doc、xls、ppt文档转换成html及System.Runtime.InteropServices.COMException (0x80004005): 360的问题
- 文档管理系统 之一 doc、xls、ppt文档转换成html及System.Runtime.InteropServices.COMException (0x80004005): 360的问题
- Visual Studio 2008项目System.Runtime.InteropServices.COMException解决方法
- c#程序在部分电脑运行异常解决方法(System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务)
- 关于system.runtime.interopservices.comexception(0x800A1066)的问题