Convert a txt file to a table

woknick

Registered User.
Local time
Today, 05:08
Joined
Sep 25, 2004
Messages
85
I have a txt file that includes X and Y variables like below, with a comma seperating the x from the y.

1.5,2
1.9,30.25
100.00,5.23
4.16,12.3
10.23,14.5
..
....
..... up to an unspecified number

how can I import the txt file data and place that data into a table.

A GPS device creates the txt file that will be placed in a folder.

thank you in advance
 
In the database window choose New>Import. Select txt as the file type and choose a delimted file separated by commas.
 
I want to automate this process.
 
I want to have a button on a form that when clicked will inport a text file from a predefined folder and place the contents of the txt file into a new table. The text file uses commas as delimeters. so I will have two numbers in the txt file and will want those numbers placed into a table with colums X and Y. Here is the strat of what I need to use. I am stuck after this

Open Me.FileName For Input As #1

Line Input #1, buffer
While Not EOF(1)

'import values seperated by ,

'then Write it to a new table ...
 
You don't have to do it that way. I would only use the Open and Line Input method if each record in the file was different. You can use TransferText to do this more quickly and easily. You might want to do it manually once to create a setup definition file. but once you have that, its easy.
 

Users who are viewing this thread

Back
Top Bottom