0

我有两个 xls 文件:file1.xls 和 file2.xls

我想将文件“file1.xls”的 sheet1 的内容复制到文件“file2.xls”的 sheet2 中。

4

1 回答 1

0

考虑类似的事情:

Sub dural()
    Dim alpha As Workbook, beta As Workbook
    Workbooks.Open Filename:="C:\TestFolder\alpha.xlsm"
    Set alpha = ActiveWorkbook
    Workbooks.Open Filename:="C:\TestFolder\beta.xlsm"
    Set beta = ActiveWorkbook
    alpha.Sheets(1).Copy Before:=beta.Sheets(1)
End Sub
于 2013-09-08T14:18:59.457 回答