View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Upload multiple text files into 1 excel worksheet + put the filena

Try something like this:

I'm pretty sure this is a job that MS Query can easily handle.

First, make sure that each column in the text file has a unique column heading
Follow the same delimiter pattern that the file already has. If the file has
commas, separate the col headings with commas, etc.

Next,

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Aster" wrote:

Hi,
I have multiple text files (*.txt) in 1 folder that I need to combine
in 1excel spreadsheet.
For each row in the text file, I would also need the filename of each
file to appear in my excel, ie. in the first column. The next column
will be the content.

Example of source files:
- File A01.TXT: Content:
Row 1....
Row 2...
- File A02.TXT: Content:
Row 1....
Row 2...

Combined Result in Excel:
Row Column A Column B
1 A01.txt Row 1...
2 A01.txt Row 2...
3 A02.txt Row 1...
4 A02.txt Row 2...

Thanks for any of u who can help