å¯éç¨å¦ä¸ä»£ç ã该æ件尽éä¸è¦æ¾å¨ç®æ æ件夹ä¸ãè¿è¡æ¶ï¼åªè¿è¡è¯¥workbookï¼å
¶ä½å
³éã
å
¶ä¸çæ©å±å(xlsè¿æ¯xlsxéè¦ä½ 确认ä¸ä¸ï¼å¯æ´æ¹ï¼
Sub Data_Col()
Dim my_Path As String
Application.FileDialog(msoFileDialogFolderPicker).Show
my_Path = Application.FileDialog(msoFileDialogFolderPicker).SelectedItems(1)
Dim my_Doc As String
my_Doc = Dir(my_Path & "\" & "*.xlsx") 'æå¨æ´æ¹æ©å±å
Dim j As Single
j = 1
Do While Len(my_Doc) <> 0
Workbooks.Open (my_Path & "\" & my_Doc)
ThisWorkbook.Worksheets(1).Cells(j,1)=my_doc
Dim i As Single
For i = 2 To 12
ThisWorkbook.Worksheets(1).Cells(j, i) = Workbooks(2).Worksheets("TEST -RESULT").Cells(29, i)
Next
Workbooks(2).Close
my_Doc = Dir
j = j + 1
Loop
End Sub
温馨提示:内容为网友见解,仅供参考