Excel导出失败的提示

未处理System.InvalidCastException
HResult=-2147467262
Message=无法将类型为“Microsoft.Office.Interop.Excel.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Excel._Application”。此操作失败的原因是对 IID 为“{000208D5-0000-0000-C000-000000000046}”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 库没有注册。 (异常来自 HRESULT:0x8002801D (TYPE_E_LIBNOTREGISTERED))。
Source=mscorlib
StackTrace:
在 ZITaker.UI.ExportExecl.DoTask() 位置 f:\Software\ZBMYun\SourceCode\ZITaker\ZITaker\UI\ExportExecl.cs:行号 243
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException:

 

按照这里的步骤操作就好了

英文版

图片文字的中文版  http://tieba.baidu.com/p/3565328186

 

posted @ 2015-01-13 10:09  ChuckLu  阅读(1835)  评论(0编辑  收藏  举报