How to import a Tab Separated Values file.

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top