Import multiple CSV files

  • Thread starter Thread starter PR
  • Start date Start date
P

PR

I need to import about 100 .csv files... I have imported 1 file and created a
spec file... does any one know a way of importing more than 1 file at a
time...

Regards
PR
 
PR said:
I need to import about 100 .csv files... I have imported 1 file and created a
spec file... does any one know a way of importing more than 1 file at a
time...

Regards
PR

Do all csv files have the same structure?
You could put the import process into a loop logic and
include some "notification messages" as to current status, file completed,
errors etc.
What is your experience with vba?
 
Roger Carlson said:
Check out Ken Snell's website:
http://www.accessmvp.com/KDSnell/EXCEL_Import.htm#ImpFolderFiles. I think
the process can be adapted to .CSV files using the TransferText method
instead of TransferSpreadsheet.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


"PR" wrote in message
news:[email protected]...
>I need to import about 100 .csv files... I have imported 1 file and created
>a
> spec file... does any one know a way of importing more than 1 file at a
> time...
>
> Regards
> PR

I agree with Roger, you can probably adapt that code. If your ImportSpecs vary, you will have to identify those specs in the procedure. This is the loop logic type of approach I was getting at.

Good luck.
 
I use a DOS command for such things.

Get to the DOS prompt and then type in the path to the folder containing the
100 csv files. Copy *.csv to Master.txt and then I renamge Master.txt to
Master.csv (otherwise the command tries to copy Master.csv into itself). Now
you have just one file, Master.csv, to import.
 
Back
Top