Importing non-delimited text file

  • Thread starter Thread starter MJ
  • Start date Start date
M

MJ

Ok, here's the problem. I have a mailing list text file that's in the form:

Company Name
Address Line 1
Address Line 2 (some listings do not have a line 2)
City, State, Zip
Phone
Fax

Each field on it's own line, double spaced between complete listings. How
can I get this imported into Access or Excel even (either or)? Any ideas
would be greatly appreciated. The file is WAY too big to go through and
edit each entry into comma separated entries.
 
You can write code to read each line of text in and insert the data into a
table. Check "Line Input" in the Help file for details of how to do this.

Do you have a blank line for those that don't have Address Line 2, or do you
just have a total of 5 lines, rather than 6? If the latter, you'll need to
check whether line 3 has commas in it (use the InStr function) to determine
which case each listing is.
 
-----Original Message-----
Ok, here's the problem. I have a mailing list text file that's in the form:

Company Name
Address Line 1
Address Line 2 (some listings do not have a line 2)
City, State, Zip
Phone
Fax

Each field on it's own line, double spaced between complete listings. How
can I get this imported into Access or Excel even (either or)? Any ideas
would be greatly appreciated. The file is WAY too big to go through and
edit each entry into comma separated entries.


.
Send me a few record in a file and I will make you a
small routine for reading this file.

Email:[email protected]
 
Back
Top