-- 作者:有点甜
-- 发布时间:2014/9/30 17:53:00
--
这个意思?
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\\1.xls") Dim Wb2 As MSExcel.WorkBook = App.WorkBooks.Open("D:\\2.xls") Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets("sheet1") \'指定要复制的工作表 Dim Ws2 As MSExcel.WorkSheet = Wb2.WorkSheets("sheet1")
With Wb2.WorkSheets Ws.UsedRange.Copy ws2.Paste End With Wb.Save wb2.save App.Quit
|