Microsoft Office Tutorials and References
In Depth Information
Importing or Linking to Data
When the import or link is complete, you see a new table listed in the
Database window (unless you chose the Append option). Imported tables
appear just like other tables, and you use them the way you use any other
tables; you can change field names and properties, create relationships,
enter data, and edit data. A linked table appears with an arrow and an icon
indicating the type of file that the link points to.
You can use linked tables the way you use any other tables in the database,
except that you can’t enter and edit data. You can’t change field properties
or enforce referential integrity for linked tables.
The following sections provide details on using import and link wizards for
text and spreadsheet files. You may see import wizards for other types of
files that are similar to text and spreadsheet files in the information they
need. Access wants to know how to get to and use the file, as well as how to
break the data into fields.
Importing text or spreadsheet data
If you import or link a text file, the Import Text Wizard or Link Text Wizard
starts when you select the appropriate file in the Get External Data dialog
box (refer to Figure 4-3, earlier in this chapter). The two wizards are similar,
but the Link Text Wizard has fewer steps.
Are you importing a whole worksheet? If not, you may want to create a named
range in the spreadsheet to make importing exactly the data that you need
easier. Access uses the first eight rows of data to determine the data type. If
Access happens to select the wrong data type (based on the first eight rows),
format the cells in your spreadsheet to the correct data type. If the first eight
zip codes start with a digit other than 0, for example, Access formats the zip
codes as numbers. To keep the leading 0, format it in Excel as text.
Follow these steps to complete the text wizards:
1. In the first wizard window (shown in Figure 4-4), select the Delimited
or Fixed Width option to describe how your data is divided; then click
the Next button.
The Delimited option is for situations in which commas, tabs, or other
characters separate fields, whereas the Fixed Width option is for
situations in which spaces make the columns line up.
2. In the second window, further define where one field ends and the
next begins; then click the Next button.
If you chose the Delimited option in Step 1, you see Figure 4-5, which
asks you what character separates your fields. (Choose one of the listed
options, or choose Other to specify the character used.) Also specify
whether the first row contains field names and whether you’re using text
qualifiers (symbols that surround text, such as double or single
quotation marks). Your data is shown with vertical lines separating fields.