PDA

View Full Version : combine all file in a one workbook



KK1966
10-19-2012, 02:43 AM
hi, all
don't know it's possible or not, but i want to try if anyone can help as i have too many file which is .CSV and all the data what i need just on a sheet1 with located in a specify folder, do VBA can help combination all the file in one workbook and the sheet name = the CSV file name ?

:doh:
highly thanks and appreciated the help ..:yes : pray2:

Ctrl+s
10-19-2012, 10:51 PM
What about the Data Structure? all Columns are same? or different for each sheet?

Here is a KB article, which may helps you.

http://www.vbaexpress.com/kb/getarticle.php?kb_id=151

snb
10-20-2012, 05:51 AM
to integrate all csv files in folder G:\OF into 1 csv file, named 'G:\OF\all.csv' use:


sub snb()
shell "cmd /c copy G:\OF\*.csv G:\OF\all.csv"
end sub