|
楼主 |
发表于 2018-10-8 07:55
|
显示全部楼层
这个代码很好了,可以提取已提取过的数据,我没更改明白,我手里有一串代码已有的我没办法把你这个功能利用进去,没改好
Sub huizong()
Application.ScreenUpdating = False
ReDim arr(1 To 50000, 1 To 1), arr1(1 To 50000, 1 To 1), arr2(1 To 50000, 1 To 1), arr3(1 To 50000, 1 To 1), arr4(1 To 50000, 1 To 1), arr5(1 To 50000, 1 To 1)
f = Dir(ThisWorkbook.Path & "\*.xls*")
Do While f <> ""
If f <> ThisWorkbook.Name Then
Set wb = Workbooks.Open(Filename:=ThisWorkbook.Path & "\" & f, Password:="ph")
n = n + 1
arr(n, 1) = wb.Worksheets(1).[n409]
arr1(n, 1) = wb.Worksheets(1).[m2]
arr2(n, 1) = wb.Worksheets(1).[e5]
arr3(n, 1) = wb.Worksheets(1).[v3]
arr4(n, 1) = wb.Worksheets(1).[v4]
arr5(n, 1) = wb.Worksheets(1).[v2]
wb.Close False
End If
f = Dir
Loop
Sheet1.[g12].Resize(n, 1) = arr
Sheet1.[b12].Resize(n, 1) = arr1
Sheet1.[c12].Resize(n, 1) = arr2
Sheet1.[f12].Resize(n, 1) = arr3
Sheet1.[e12].Resize(n, 1) = arr4
Sheet1.[d12].Resize(n, 1) = arr5
End Sub
|
|