Dim fl As String If 条件1成立 Then fl = ProjectPath & "Attachments\模板1.xls" ElseIf 条21成立 Then fl = ProjectPath & "Attachments\模板2.xls" ElseIf 条件3成立 Then fl = ProjectPath & "Attachments\模板3.xls" Else Return End If Dim Book As New XLS.Book(fl) Book.Build() '生成细节区 Book.Save(fl) '保存工作簿 Dim Proc As New Process '打开工作簿 Proc.File = fl Proc.Start()