Vba import data access in Excel
Data exchange between applications is often required in organizations ranging from small to large.
The data may be of any form ranging from Access database,SQL database,XML or any other format.
But for easy manipulation, most of the organizations prefer to convert the data into excel format.
In other words, import data from external source into excel.
There are various source of data and one of the most common source is MS Access.
The following steps illustrates, how to import data from Access database.
Goto "Data" tab and select "From Access" as shown below:
The "Select Data Source" dialog box appears from where, the database file has to be chosen.
Once the database is selected, the next dialog box appears demanding to choose a table to import data from.
Once the table is selected, the next step is to choose the fields to import.
The "Import Data" dialog box enables the user to set various criteria such as,
whether to import data in existing or new sheet, to import as table, pivot table,
pivot chart or simple connection and so on.
Once the "OK" button is clicked, the corresponding data are imported.
Note that there is a difference between importing data and just copy and paste. In the former case, a connection is established between the database and
the excel and hence any change in the database will be reflected here in the excel, when "Refresh All" is clicked.