|
- Sub test()
- Dim str$, str_Path$, arr
- str_Path = ThisWorkbook.Path & ""
- str = Dir(str_Path & "*.xls")
- Range("a2:f10000").ClearContents
- Application.ScreenUpdating = False
- On Error Resume Next
- Do While str <> ""
- If InStr(str, "汇总表") = 0 Then
- Workbooks.Open str_Path & str
- arr = Range("a2:f" & Cells(Rows.Count, 1).End(3).Row)
- ActiveWorkbook.Close 0
- End If
- Sheets("汇总表").Cells(Rows.Count, 1).End(3).Offset(1, 0).Resize(UBound(arr), UBound(arr, 2)) = arr
- str = Dir
- Erase arr
- Loop
- Application.ScreenUpdating = False
- End Sub
复制代码 |
评分
-
查看全部评分
|