Office 2007 - Access

Lesson 69: Importing Data

69/72 Lessons 

From an “Excel” file

In “Access”, we have the ability to import data from an “Excel” file into an existing table or a new table.
You can import an entire spreadsheet or only a portion of a spreadsheet.
Click on the “Excel” button in the “Import” group under the “External Data” tab in the “Ribbon”.


In the dialog that appears, click the “Browse” button to import an “Excel” file that you want to select.
This opens a second “Open File” dialog. Navigate to the file, select it and click the “Open” button.


In the first dialog, we have three options.
These are all pretty clear.
Click the OK button.
This opens the “Worksheet Wizard”.
When the spreadsheet consists of several worksheets or there are named ranges in this spreadsheet, we see the following window. Select the worksheet or named range that you want to import and click the “Next” button.


In the second window of the wizard, check the box for “First row contains column headings” if your worksheet contains column headings. “Access” will then use first row as field names.
The column headings should be in the first row of the worksheet.
Click the “Next” button.

In the third window of the wizard, we can give the field name and the data type for each field.
We have the ability to index the fields and we have the ability to import a field.
To make changes to a field, click the title field in the lower part of the wizard window.
When you have completed changes to all fields, click the “Next” button.


In the next window of the wizard, you decide whether you want to define a “Primary key” field.
You can let “Access” add a “Primary key” or select a field that you want to set as “Primary Key”.
Because this worksheet has no unique field, I let “Access” add a “Primary key” field.
“Access” will automatically give the field name as “Id” with the data type as “Autonumber”.
Click the “Next” button.


In the last window of the wizard, you give the table a name and click the “Finish” button.

In the window that appears, you can save the import steps if you wish.
Make your choice and click the “Close” button.

Your worksheet is now included in the “Navigation pane” of the “Access” database.

Awesome!
You've completed Lesson 69
START NEXT LESSON