Importing non-delimited text file

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.
 
D

Douglas J. Steele

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.
 
M

Miki Stamenkovic

-----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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top