Dim t As Integer=e.Form.Controls("TextBox1").Value For i As Integer = 1 To t Dim Book As New XLS.Book(ProjectPath & "Attachments\订单.xls") Dim fl As String = ProjectPath & "Reports\订单.xls" Book.Build() '生成细节区 Book.Save(fl) '保存工作簿 Dim Proc As New Process '打开工作簿 Proc.File = fl Proc.Verb = "Print" '指定动作 Proc.Start() Next