Const xlWorkbookNormal = -4143
Const xlSaveChanges = 1
objStartFolder = "c:\test" 'The source file directory to be read
desExcel= "c:\" 'The last generated summary excel
Set ExcelApp = CreateObject("")
Set destbook = 'Create empty file
Set objFSO = CreateObject("")'Create filesystemobject
Set objFolder = (objStartFolder)'Get folder
Set colFiles = 'Get all files in the source directory
intRow=1 'Number of rows
For Each objFile in colFiles 'process the files in the folder in turn
If UCase(Right(Trim(), 3)) ="XLS" Then 'Only process xls files
Set srcbook = (objStartFolder + "\" + ) 'Open xls file
'(1).Copy (1)
intCol = 1 'Number of columns
Do Until (1,intCol).Value = ""
tempdata=(1, intCol).Value
(intRow, intCol).Value=tempdata
intCol = intCol + 1
Loop
'Close the already opened xls file
End If
intRow=intRow+1
Next
desExcel,xlWorkbookNormal
xlSaveChanges