Dim Book1 As New XLS.Book("c:\LS1.xls")
Book1.Build() '生成细节区
Dim Book2 As New XLS.Book("c:\LS2.xls")
Book2.Build() '生成细节区
Dim Book3 As New XLS.Book("c:\LS3.xls")
Book3.Build() '生成细节区
Dim A1 = Book1.Sheets("A表")
Dim B2 = Book2.Sheets("B表")
Dim C3 = Book3.Sheets("C表")
Dim Book4 As New XLS.Book("c:\总表.xls") '定义总工作簿
Book1.Sheets.Remove(A1)
Book4.Sheets.Insert(0,A1)
Book2.Sheets.Remove(B2)
Book4.Sheets.Insert(3,B2)
Book3.Sheets.Remove(C3)
Book4.Sheets.Insert(5,C3) '把各个临时工作簿生成的报表插入至总工作簿指定位置
Book4.Save("c:\reports\总表.xls") '保存
Dim Proc As New Process
Proc.File = "c:\reports\总表.xls"
Proc.Start() '打开总工作簿