-- 作者:易服
-- 发布时间:2010/3/28 22:16:00
--
1、生成空表 With Tables("总览") .Select(0 ,0, .Rows.Count - 1, .Cols.Count - 1) End with Dim Book As New XLS.Book(ProjectPath & "Attachments\\竣工一览表.xls") \'打开模板 Book.Build() \'生成细节区 Book.Save(ProjectPath & "Reports\\竣工一览表.xls") \'保存工作簿 Dim Proc As New Process \'打开工作簿 Proc.File =ProjectPath & "Reports\\竣工一览表.xls" Proc.Start()
此主题相关图片如下:2010-3-28 21-59-56.png 2、涉及到表达式列的报表有的出现一楼的错误提示,连续不断地点击“确定”直到错误提示消失,报表还是能出现。如 With Tables("总览") .Select(0 ,0, .Rows.Count - 1, .Cols.Count - 1) End with Dim Book As New XLS.Book(ProjectPath & "Attachments\\设计一览表.xls") \'打开模板 Book.Build() \'生成细节区 Book.Save(ProjectPath & "Reports\\设计一览表.xls") \'保存工作簿 Dim Proc As New Process \'打开工作簿 Proc.File =ProjectPath & "Reports\\设计一览表.xls" Proc.Start() 3、例子不太好做