![]() |
![]() |
|
Importing ASCII Files |
Last Updated: November 30, 2003
There are times when one needs to import an ASCII File into a database. To be useful in a database, the ASCII file must be in one of two formats: a fixed format or ASCII delimited. To import either type into Access, have an Access file into which you wish to import the file open, and on the menu line click on File>Get External Data and answer all the questions on the screen.
A fixed format file has every character limed up as though it were in a separate cell of a table. The file will look like the following:

To import this file, one would tell the database that the first name field started in column 1, and was 6 characters long. The last name field starts at column 8 and is 5 characters long. Age starts at column 13 and is 3 characters long. It is not necessary to have a space between the fields, just to know where each field starts and how long it is. The ASCII file will not have any lines or numbers thus it may be necessary to count the number of characters in a field. If the person who gives you the file can furnish this information it will save you this task.There can be no hard returns between the characters in a record.
An ASCII delimited file has all the fields separated by a given character. Often this character is a comma, in which case the file will be called a "comma delimited file." Sometimes this character is the tab key. These files will be called "tab delimited." In these files text fields will be contained within quotation marks and numeric fields will be plain. The above file in a comma delimited file will look like the following:
"Sally","White",35
"Anne","King",43
For questions or broken links please email the author .
Copyright 2003/2008 Linda Q. Thede
All rights reserved