How to import a Tab Separated Values file.

G

Guest

Can I use the TransferText method to import Tab separated .txt file in to a
tabel?

Let me describe what I'm trying to do in order to see if there may be a
better method of doing this. :)

I have a file that is generated by a batch process and is saved to a system
drive.
It is a Tab Separated Value Text file with the field names in the first row.

I have a function written to process this information once the data is
imported in to Access. I am currently having the users do File, Get External
Data...
What I'm working on is useng the FileDialog to browse to the file, then I
want to import the information in to a new version of an existing table.
Rename the old table, copy the structure over and import the data.

I am planning on using the TransferText method as it seems to be what most
people are using. However in the help file it noted CSV or fixed length
fields...

any help would be appreciated.

Thanks!!
Jeff
 
M

Marshall Barton

Jeff said:
Can I use the TransferText method to import Tab separated .txt file in to a
tabel?

Let me describe what I'm trying to do in order to see if there may be a
better method of doing this. :)

I have a file that is generated by a batch process and is saved to a system
drive.
It is a Tab Separated Value Text file with the field names in the first row.

I have a function written to process this information once the data is
imported in to Access. I am currently having the users do File, Get External
Data...
What I'm working on is useng the FileDialog to browse to the file, then I
want to import the information in to a new version of an existing table.
Rename the old table, copy the structure over and import the data.

I am planning on using the TransferText method as it seems to be what most
people are using. However in the help file it noted CSV or fixed length
fields...


TransferText should be fine as long as you set the import
specification appropriately using the File Import menu item.

I strongly urge you to forget about using the FileDialog to
browse for the file. That thing is fraught with problems
and will cause you all kinds of headaches. Instead, use the
rock solid code at:
http://www.mvps.org/access/api/api0001.htm
 

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