text to excel

V

vikram

Hello

I have 15 different text file which i want to import in one excel fil
at one go

can ewe do it with the help of a macro

thank
 
G

Greg Koppel

You can do it with a macro, but perhaps easier is to combine the text files
in DOS and then import to Excel. To combine in DOS, have all the files in
the same folder, open a DOS prompt and type something like the following:
COPY C:\MyDocuments\TextFiles\*.txt AllFiles.txt

HTH, Greg
 
D

Dave Peterson

When I do this in Win98, I have to be careful.

If I'm sitting in the c:\mydocuments\textfiles folder, then AllFiles.txt will
try to get created there.

But since it has an extension of .txt, the copy command wants to include it and
win98 burps.

If I'm not sitting in that folder, then allfiles.txt will go to the current
folder of the active drive--and everything will be ok.

I like this so that I never have to worry:
c:
cd \mydocuments\textfiles
COPY *.txt AllFiles.ALL

Excel will see .ALL as a text file, too.
 
Top