以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=95387) |
-- 作者:DEZHIMA -- 发布时间:2017/1/18 11:12:00 -- [求助] http://pan.baidu.com/s/1boQByH5 您好,请问Excel报表调用时生成打开时没有问题,而预览时却出现错误(见链接)。 Dim Book As New XLS.Book(ProjectPath & "Attachments\\资料卡.xls") \'打开模板 Dim fl As String = ProjectPath & "Reports\\资料卡.xls" Dim Sheet As XLS.Sheet = Book.Sheets(0) Sheet(1,0).Value = "<员工, 1>" \'细节区定义一 Sheet(11,0).Value = "<员工>" \'细节区定义二 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(0) App.Visible = True Ws.printout(Preview:=True) App.Quit \'Dim Proc As New Process \'Proc.File = fl \'Proc.Start() |
-- 作者:有点色 -- 发布时间:2017/1/18 11:22:00 -- 看看 http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=79881&skin=0
|
-- 作者:DEZHIMA -- 发布时间:2017/1/18 11:29:00 -- 谢谢老师。我试试 |