LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to read multiple text files into excel?

Hi,
I have a big problem in my master thesis.
I want to read many text file into excel file for data analyses. Th
text files are so numerous that I can not read the files one by one. S
I plan to read it into excel by VBA code. But I just learn to how t
read one file into excel, and do not know how to deal with numerous.
can modify to name the files with number. My code:

Sub opentext()

Dim i As Integer


For i = 1 To 10000

Workbooks.opentext Filename:="D\:VB\10000+i.out", _ /The text file ca
be name as 10001, 10002,....
Origin:=xlMSDOS, _
StartRow:=1, _
DataType:=xlDelimited, _
ConsecutiveDelimiter:=True, _
Space:=True

Next i

End Sub

Obviously, the code can not work. Could somebody give me a help. Thank
in advance

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Read Multiple CSV files into Excel Kirstin Donaldson Excel Worksheet Functions 0 August 2nd 10 05:08 AM
Importing multiple Text files into Excel 2003 JMA Excel Discussion (Misc queries) 5 May 5th 05 09:48 PM
Import multiple text files into excel Wally Steadman[_2_] Excel Programming 1 November 15th 03 04:14 PM
Read/Write data to/from text files from a spreadsheet. lothario[_37_] Excel Programming 8 November 2nd 03 03:10 PM
findinf text in multiple excel files Jeff Smith Excel Programming 1 September 5th 03 06:30 PM


All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"