Dim Ns As WinForm.CheckedComboBox = Forms("窗口2").Controls("CheckedComboBox1")
If Ns.text > ""
For i As Integer = 0 To Ns.text.split(",").length -1
Dim Book As New XLS.Book("C:\foxtable\CaseStudy\Attachments\" & Ns.text.split(",")(i) & ".xls") '打开模板
Book.Build() '生成细节区
Book.Save("C:\foxtable\CaseStudy\reports\" & Ns.text.split(",")(i) & ".xls") '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = "C:\foxtable\CaseStudy\reports\" & Ns.text.split(",")(i) & ".xls"
Proc.Start()
Next
End If