importing flat file

F

ftrujill0

I have reviewed several of the past posts about importing a file into access,
and have not found what I am looking for...basically, I have a fixed width
text file that I would like to import into a table but the column headers
don't start until line 6 of the file, with page headers, etc.. above. My
question is there a way to start the importing on line 6th rather than line 1
of the file?

thanks in advance.
 
J

John W. Vinson

I have reviewed several of the past posts about importing a file into access,
and have not found what I am looking for...basically, I have a fixed width
text file that I would like to import into a table but the column headers
don't start until line 6 of the file, with page headers, etc.. above. My
question is there a way to start the importing on line 6th rather than line 1
of the file?

thanks in advance.

You'll probably need to preprocess the file, either in a text editor or by
using VBA to read in the file, discard six rows and output to another file. I
don't believe that an import specification can do that for you.
 
L

Lance

There are two ways to do this.

Pre-format your file by removing the unwanted lines.

Or import the whole thing and run a query to delete the unwanted lines.
Depending on what kind of field types you have, this may require bringing the
table into a temporary "work table" and updating/deleting as required then
moving it into a production table. It's a bit more work to set up, but will
ultimately save you a lot of time as you won't need to manually fix the file
each time.
 

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