0% found this document useful (0 votes)
4 views16 pages

Importing and Exporting Data in Access

Database Notes

Uploaded by

csecclassnrmss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views16 pages

Importing and Exporting Data in Access

Database Notes

Uploaded by

csecclassnrmss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Importing and Exporting Data in Access

Importing Data into a Database


To understand what kind of data you can import in the Access data, let us open your
database and go to the External Data tab.

In the import & Link group, you can see the different kind of options available for data
import in Access. Following are the most commonly used data import formats.

 Microsoft Office Excel


 Microsoft Office Access
 ODBC Databases (For example, SQL Server)
 Text files (delimited or fixed-width)
 XML Files

Example

Let us look at a simple example of data importing from an Excel file. Here is the data in
Access file.
To import the data in Access, we first need to open the Access database and then go
to the External Data tab as in the following screenshot.

In Import & Link group, you will see an option Excel. Let us click on that option.
Browse the Excel file from which you want to import data and the then we have
different options to store data. Let us select the first option and click Ok.
Here you will see the preview of your data. Now, click Next.
In the Preview, you can now see that the first row contains the column headings. Let us
now check the check box and click Next.
You will now see a dialog box where you can set the data type for each column/field. If
you don’t want to import any field, just check the check box which says do not import
field. Once you are done with the FirstName field, just click on the MiddleInitial field.
Let us now go through all the fields and then, click Next.
Here are the different options for primary key. Let us select the first option and click
Next.
In the last dialog box, you can enter the table name of your choice and click Finish.
If you want to save all these steps, then check the checkbox and close the dialog box.
Let us now go to the Navigation pane. You will see a new table is added here and
when you open the newly added table you will see all of your data in Access.
Importing Data into a Database

In this chapter, we will understand how to export data from Access. Data export is
actually the opposite of importing data. In importing data, we bring data from other
formats in Access, while in exporting we save the data in other formats.
To understand what kind of data you can export from Access data, let us open your
database and go to the External Data tab.

In the Export group, you can see the different kind of options available for data export
from Access. Following are the most commonly used data export formats −

 Microsoft Office Excel


 Microsoft Office Access
 ODBC Databases (For example, SQL Server)
 Text files (delimited or fixed-width)
 XML Files

Example
Let us look at a simple example of data export from Access. Open your database
where you want to export the data from. In the Navigation Pane, select the object that
you want to export the data from.
You can export the data from table, query, form, and report objects etc. Let us select
the qryAllProjects and then, go to the External Data tab.
On the External Data tab, click on the type of data that you want to export to. For
example, to export data in a format that can be opened by Microsoft Excel, click Excel.
Access starts the Export wizard. In the wizard, you can set the information such as the
destination file name and format, whether to include formatting and the layout, which
records to export. Once you are done with the required information, click Ok.

On this screen of the Wizard, Access usually asks you if you want to save the details of
the export operation. If you think you will need to perform the same operation on a
recurring basis, select the Save export steps check box and close the dialog box.
The following Excel file opens up.
Let us now suppose you want to export data to a text file, on the External Data tab,
click on the Text File.

Specify the export options and click Ok. You will see the Encode dialog box, wherein
we want to export the data in default encoding.

Select the first option and click Ok.


On this screen of the wizard, Access usually asks you if you want to save the details of
the export operation. If you think you will need to perform the same operation on a
recurring basis, select the Save export steps check box and close the dialog box.
You will now see that the Text file is open.

You might also like