关于vba 在word中打开excel,然后复制其中单元格的数据,粘贴回wrod中

2025-04-10 01:52:46
推荐回答(1个)
回答1:

主要代码为:

Sub test()
Set exapp = CreateObject("excel.Application")
exapp.Visible = True
Set xlsbook = exapp.Workbooks.Open("C:\ex.xls")
xlsbook.workSheets("sheet1").Rows("3:44").Copy
Selection.Paste
End Sub