System.Runtime.InteropServices.COMException(0x800706BE):远程过程调用失败

当我尝试打开Excel文档时,出现此错误

System.Runtime.InteropServices.COMException(0x800706BE):远程过程调用失败。

我为我的公司构build了一个应用程序,它在每台计算机上工作正常,但是在我的老板电脑上,当应用程序必须打开一个Excel文档时,它停止工作。

我试图改变组件服务的权限,但没有解决。

我正在使用Windows 7。

Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application(); object missing = Type.Missing; Excel.Range xlRange; Excel.Sheets xlSheets = null; Excel.Worksheet xlSheet = null; Excel.Workbook xlWorkbook = null; xlWorkbook = excelApp.Workbooks.Open(filePath, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);