以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 老师这个提示改怎么解决呢??? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=55689) |
-- 作者:man9997 -- 发布时间:2014/8/21 13:46:00 -- 老师这个提示改怎么解决呢??? .NET Framework 版本:2.0.50727.5483 Foxtable 版本:2014.8.15.1 错误所在事件:窗口,Customer Information,Button1,Click 详细错误信息: 无法将类型为“Microsoft.Office.Interop.Excel.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Excel._Application”。此操作失败的原因是对 IID 为“{000208D5-0000-0000-C000-000000000046}”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 不支持此接口 (异常来自 HRESULT:0x80004002 (E_NOINTERFACE))。 |
-- 作者:man9997 -- 发布时间:2014/8/21 13:55:00 -- 我的预览代码 Dim Book As New XLS.Book(ProjectPath & "Attachments\\invoice st.xls") Dim fl As String = ProjectPath & "Reports\\invoice st.xls" Book.Build() Book.Save(fl) Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) App.Visible = True Ws.PrintPreview App.Quit |
-- 作者:man9997 -- 发布时间:2014/8/21 13:55:00 -- 打印代码 Dim Book As New XLS.Book(ProjectPath & "Attachments\\invoice st.xls") Dim fl As String = ProjectPath & "Reports\\invoice st.xls" Book.Build() Book.Save(fl) Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) Ws.PrintOut App.Quit
|
-- 作者:Bin -- 发布时间:2014/8/21 14:05:00 -- 参考http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=47983 |