Importing with Multiple delimiters

K

Karen

I am trying to import some very large flat files which use |~| as the
delimter. Does anyone know how to import this data into excel or
access? Or have VB code which will model importing and parsing this
large file. Starting with 30,000 to 600,000 lines in each text
file--only need 3-10 items in the whole....
 
M

Marty

This is very easy to do, not in EXCEL, but ACCESS. Create
a new database. When you see the new database window,
right click in it and select link (I do not recommend
import). When the link dialog box opens make
sure "delimited" is selected and click next. Select OTHER
and put the ~ character in the text box. If the first row
has the field names make sure the "Use First Row As Field
Names" check box is checked; then click finished. I know,
this will bring in the whole file and you only need some
records. Click Queries under OBJECTS in the left portion
of the DB window. Select NEW. Select the table you just
linked then click ADD then CLOSE that dialog box. Now
let's say you know you want all the records where field3
is greater than 100. double the * character then double
click field3. In the lower portion of the query dialog
UNCHECK the Show box for field3 an put, in the CRITERIA
row under field3 >100. If it's text you are looking for
use Right(), Left() and Mid() for a particular string of
characters. For more information on right/left/mid look
them up in the Help file. Then click the red ! in the
tool bar.

HTH, Marty
 
M

Marty

Oh I almost for got: If you have more than one delimiter,
select another delimiter as well as the Other box.

marty
 

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