Merge Multiple excel File in one File

Rumman Ansari   2022-09-13   Developer   miscellaneous > Merge Multiple excel File in one File   529 Share

In this blog I will show you how to add multiple excel file in one excel file in different sheets.


Sub GetSheets() 
Path = "\" 
Filename = Dir(Path & "*.xlsx") 
Do While Filename <> "" 
Workbooks.Open Filename:=Path & Filename, ReadOnly:=True 
For Each Sheet In ActiveWorkbook.Sheets 
Sheet.Copy After:=ThisWorkbook.Sheets(1)
Next Sheet
Workbooks(Filename).Close 
Filename = Dir() 
Loop 
End Sub