【发布时间】:2009-11-09 09:21:11
【问题描述】:
我正在尝试打开一个 Excel 工作簿并尝试在其中获取一个工作表。 Excelapp.workbooks.Open 行抛出异常为
来自 HRESULT 的 System.Runtime.InteropServices.COMException:Microsoft.Office.Interop.Excel.Workbooks.Open 的 0x800A03EC
这是我的代码:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(strWBPath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, true);
StrWbPath 是我的 Excel 位置。我指的是 2007 excel 并添加了版本 12.0.0.0 的 Microsoft.office.interop.excel。
【问题讨论】:
-
它是什么类型的应用程序?控制台应用程序? asp.net/winforms?
标签: c# excel-2007