import multiple csv files into excel 2007

A

Annie - torston

I receive an e-mail with several CSV files attached. How can I import all of
these into an excel spreadsheet that has already been set up with the correct
headers. At the moment we open & save each csv file as an excel doc (07) &
then copy & paste into main sheet. There must be a quicker way.
 
I

Iam Sapphire

The easiest way.. is to MERGE the CSV files FIRST, then open the MERGED file in Excel.

Let's suppose you have 3 files saved in a folder

Like:
Jimsproducts.csv
Joesproducts.csv
Bobsproducts.csv

You saved them in a folder, like C:\SavedAttachments

You can run a command like this using the DOS prompt.

Click START, click RUN, type CMD

This will give you a black screen of DOS.

Now type copy c:\SavedAttachments\*.csv c:\SavedAttachments\Merged\Mergedproducts.csv

This COMBINES all 3 of the files together.. than saves the COMBINED file into one called, Mergedproducts.csv

I also added another FOLDER called, MERGED.. because you can't run the command (copy) in the same folder.. because the Mergedproducts.csv FILE is created when you run the command, so it is ALSO merged into itself...

So.. you use the COPY command.. you use *.csv (The ASTERISKS then a PERIOD, then CSV).. the ASTERISKS means.. ALL FILES, that end with CSV.

You probably have the answer for this by now..

-sapphire

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com/default.aspx?ref=ng
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top