以下是按钮代码,需要将工资以工资条形式输出,如果没有将当月的工资数据全选,就不能输出全部
Dim Book As New XLS.Book(ProjectPath & "Attachments\海高德新技术有限公司工资条.xls") '打开模板
Dim fl As String = ProjectPath & "Reports\海高德新技术有限公司工资条.xls"
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Dim ffm As Date = e.Form.Controls("控件_工资条输出\发放月份").Value
Sheet(7,1).Value = "<发放月份 = # " & ffm & " #>" '写入打印条件
Book.Build() '生成报表
Book.Save(fl)
Dim Proc As New Process
Proc.File = fl
Proc.Start()
e.Form.Close()