代码
Dim Book As New XLS.Book(ProjectPath & "Attachments\123.xls") '打开模板
Dim fl As String = ProjectPath & "Reports\123.xls"
For i As Integer = 0 To 1
Dim Sheet As XLS.Sheet = Book.Sheets(i)
Dim d As Date = new Date(2017, i+1, 1)
Sheet(1,5).Value = "<月份 >= # " & d & "# and 月份 < #" & d.addmonths(1) & "#>" '写入打印条件
Next
Book.Build() '生成报表
Book.Save(fl)
Dim Proc As New Process
Proc.File = fl
Proc.Start()
模板