Importing Excel Data into Access

[ LiB ]

You can import data from Excel into Access by placing the new data in a new Access table or by appending it to an existing Access table.

Beginning a Data Import from Excel to Access

Whether you want to place the new data in a new table or append it to an existing table, the procedure begins the same.


graphic/17fig04.gif



graphic/17fig05.gif



graphic/17fig06.gif


If your Excel worksheet has multiple worksheets, you can only import one sheet at a time.


graphic/17fig07.gif



graphic/17fig08.gif


If you want to import the data into a new Access table, see the following section, "Importing Excel Data as a New Table."

If you want to append the data into an existing Access table, see "Appending Excel Data to an Existing Table," later in this chapter.

Importing Excel Data as a New Table

If you want to import the Excel data into a new Access table, Access will automatically create a field for each column of worksheet data.


graphic/17fig09.gif


The Import Spreadsheet Wizard will now attempt to identify the data you want to import. The first column of data will be highlighted. Access will create fields based on each column.


graphic/17fig10.gif



graphic/17fig11.gif



graphic/17fig12.gif



graphic/17fig13.gif


Now you must determine which field you want as the primary key field. The primary key field is a unique field in a table that differentiates one record from another.


graphic/17fig14.gif



graphic/17fig15.gif



graphic/17fig16.gif



graphic/17fig17.gif


Appending Excel Data to an Existing Table

If your Excel data fields match up exactly with the fields in an existing Access table, you can add (append) the Excel rows into the Access table as new records. The important thing to remember is that the field names and their order must match exactly .


graphic/17fig18.gif



graphic/17fig19.gif



graphic/17fig20.gif


[ LiB ]


Microsoft Office Excel 2003 Fast & Easy
Windows XP Registry: A Complete Guide to Customizing and Optimizing Windows XP (Information Technologies Master Series)
ISBN: N/A
EAN: 2147483647
Year: 2002
Pages: 157
Authors: Olga Kokoreva

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net