View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Easy way to extract data and put into Excel?

If all text files are of the same format (field structure); from command mode
copy the files into a single file. For example if you have your files placed
in c:\temp\

From command line use the copy command to merge the files to a single
file...and then open the merged.txt in excel...

c:\temp\copy *.txt c:\merged.txt/b

If this post helps click Yes
---------------
Jacob Skaria


"Q" wrote:

Hello:

Say if I have 5 text files. Their structures are the same, except the data
are different. Is there an easy way to extract data from them into Excel?

Say if all the data files are like the following and the number of rows in
each section is the same. Col1, Col2, ... are data.

Section1
Col1, Col2, Col3
.
.
.
End Section1
Section2
Col4, Col5
.
.
.
End Section2
Section3
Col6, Col7, Col8, Col9
.
.
.
End Section3

I like to be able to extract Section1, Col2 data, Section2, Col5 data, and
put all Col2 data into a worksheet, and put all Col5 data into a separate
worksheet.

Any suggestion?

Thanks,

Q