Foxtable(狐表)用户栏目专家坐堂 → 制作窗口和制作报表打印快捷键问题?


  共有14718人关注过本帖树形打印复制链接

主题:制作窗口和制作报表打印快捷键问题?

帅哥哟,离线,有人找我吗?
易服
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:787 积分:6349 威望:0 精华:0 注册:2008/9/1 8:26:00
  发帖心情 Post By:2011/5/24 16:31:00 [显示全部帖子]

一键打印多个报表

Dim Names() As String
Names = New String() {"结果分析表","林种统计表","面积统计表","秋季验收表","补助测算表","坡度统计表","权属统计表","设计汇总表","设计统计表","投资测报表","预算汇总表","植被统计表","验收汇总表","二期补助表"}
For Each Name As String In Names
    With Tables("分组统计")
        .Select(0 ,0 ,.Rows.Count - 1, .Cols.Count - 1)
    End With
    Dim Book As New XLS.Book(ProjectPath & "Attachments\" & Name & ".xls") '打开模板
    Book.Build() '生成细节区
    Book.Save("D:\My Documents\退耕报表\"& Name & ".xls") '保存工作簿
    Dim App As New MSExcel.Application
    Dim Wb As MSExcel.Workbook = App.WorkBooks.Open("D:\My Documents\退耕报表\"& Name & ".xls")
    Dim Wd As MSExcel.Window = Wb.Windows(1)    '表示当前工作簿窗口
    Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
    Wd.DisplayZeros = False                 '不显示0值
    App.Visible = True
Next


 回到顶部