Ms Access 2010 tutorial:import table


Import table

XIV. Import Table

Import table is a process of getting a table or tables into the current database from other database files include Access database, ODBC Database, and other file format such as Excel, Text File, XML File, HTML Document and so forth. In this section, we introduce you how to import a table from Access database, and excel file.

Example1: You are using Database1 database and want to import TblBook from SaleAndStock database. To do so, follow the steps below:

- Open Database1 database

- Click External Data tab

- Click Microsoft Access 2010 import icon  or right-click any table

- Point mouse pointer to Import

- Point mouse pointer to Access

Microsoft Access 2010 import table dialog 

A Get External Data- Access Database dialog box appears:

Microsoft Access 2010 import dialog box 

- Click Browse button to look for a location of the SaleAndStock database that you stored

- Click Ok

A Import Objects dialog box appears:

Microsoft Access 2010 import objects dialog box 

- Click TblBook and then click Ok

A Save Import Steps dialog box appears. This dialog box is used for saving import steps. By saving the import steps, for the next time you want to do the same thing, can run the saved steps instead of running the wizard. This can be time saving.

Example2: You want to import StudentList sheet from Book1 to Database1 database. To do so, follow the steps below

If you are in Database1 databasse

- Click External Data tab

- Click Microsoft Access 2010 import excel or right-click any table as the figure below:

Microsoft Access 2010 import excel file 

- Point mouse pointer to Import

- Point mouse pointer to Excel

A Get External Data- Excel Spreadsheet dialog box appears:

Microsoft Access 2010 import excel spreadsheet 

- Click Browse button to look for the location of Book1

- Click Ok

A Import-Spreadsheet Wizard dialog box appears:

Microsoft Access 2010 import excel-wizard 

This dialog box asks you to choose which worksheet or range you want to import because the Book1 excel file contains more than one worksheet or range.

Show Worksheets: This option shows all worksheet in excel file.

Show Named Ranges: It shows only name of the range that you assign to the worksheet.

- Select StudentList

- Click Next

Microsoft Access 2010 import excel-wizard set column-header 

- Tick First Row Contains Column Headers to set the first row as column header

- Click Next

Microsoft Access 2010 import excel-wizard set field data type 

This dialog box allows you set data type for each field of table.

- Select the field and then select the data type

Set the data type for all fields of the table. For the field that you consider as primary key, in front of indexed select Yes(No Duplicates).

- Click Next

Microsoft Access 2010 import excel-wizard set primary key 

The dialog box asks you to set primary key by yourself or let Access add primary key.

- Click Choose my own primary key(StudentID)

- Click Next

Microsoft Access 2010 import excel-wizard give to table 

- Type a name for the table as TblStudentList

- Click Finish

A Save Import Steps dialog box appears, to save the import steps you can do the same as you did with the Save Export Steps.

Note: The name of the table is optional.

 


Comments




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.