Microsoft Office Tutorials and References
In Depth Information
Access Integration Feature Sharing Data Among Applications
Te x t ﬁ les contain unformatted characters including both readable characters, such
as numbers and letters, and some special characters, such as tabs, carriage returns, and line
feeds. Typical extensions for text ﬁ les that can be imported or linked into Access databases
are txt, csv, asc, and tab.
To be able to use a text ﬁ le for importing or linking, it must be organized into
records (rows) and ﬁ elds (columns). Records and ﬁ elds can be organized in two ways:
delimited ﬁ les and ﬁ xed-width ﬁ les.
In delimited ﬁ les , each record is on a separate line and the ﬁ elds are separated by
a special character, called the delimiter . Common delimiters are tabs, semicolon,
commas, and spaces. You also can choose any other value that does not appear within the ﬁ eld
contents. The csv (comma separated values) ﬁ le often used in Excel is an example of a
delimited ﬁ le.
In ﬁ xed-width ﬁ les , the width of any ﬁ eld is the same on every record. For example,
if the width of the ﬁ rst ﬁ eld on the ﬁ rst record is 12 characters, the width of the ﬁ rst ﬁ eld on
every other record also must be 12 characters.
Identify sources of external data for the database: text ﬁ le.
You need to decide whether it is appropriate for you to use external data stored in a text
ﬁ le. The following are some common reasons for using a text ﬁ le for this purpose:
1. Data that you want to import is not available in a format that Access recognizes. You ﬁ rst
would export the data from the original application to a text ﬁ le and then import that
text ﬁ le into Access.
2. You manage data in Access but regularly receive data in text ﬁ les from other users that
needs to be incorporated into your database.
Determine whether the data you have identiﬁ ed is in an appropriate format:
text ﬁ le.
Before importing or linking the text ﬁ le you have identiﬁ ed, you need to make sure it is in
an appropriate format. The following are some of the actions you should take to ensure
1. Make sure the data in the text ﬁ le consistently follows one of the available formats
(delimited or ﬁ xed width). If the ﬁ le is delimited, identify the delimiter and make sure
the same one is used throughout. If the ﬁ le is ﬁ xed-width, make sure each ﬁ eld on each
record is the same width.
2. Make sure that there are no blank records within the ﬁ le. If there are, remove them prior
to importing or linking.
3. Make sure there are no blank ﬁ elds within the list. If there are, remove them prior to
importing or linking.
4. For each ﬁ eld, make sure the entries in each record represent the same type of data.
5. If it is a delimited ﬁ le, determine whether the ﬁ rst row contains column headings that will
make appropriate ﬁ eld names in the resulting table. If not, you should add such a row.
In general, the process is simpler if the ﬁ rst row in a delimited ﬁ le contains appropriate
6. Make sure there are no extra paragraph (carriage) returns at the end of the ﬁ le. If there
are, remove them prior to importing or linking.