Task Description:
Transfers product data from Access to Excel using
Excel Integration.
| Solution |
| 1. |
Connect to database |
- From Application Category->Database, Select 'Connect' option. For our
example we are using MS Access as the database, but other databases like Oracle,
SQL Server, My SQL, MS SQL, etc. may also be used.
- Select SQL query option and specify the query. e.g. select * from Products.
When the query is executed, it will return all the data of the product table.
Screenshot 1
|
| 2. |
Open Spreadsheet |
- From Application Category->Excel, Select 'Open Spreadsheet' option.
Screenshot 2
|
| 3. |
Transfer Data |
- Insert the commands to paste the data from the database into the Excel
spreadsheet.
The commands for pasting data into Excel are:
Excel : Go to beginning of the row of the active cell Excel : Set value of Active Cell with "$Dataset Column(1)$" Excel : Go to one cell right of active cell
- Repeat above commands for each column of the access database.
- Insert a loop for each row of the database Screenshot
3
- After the task runs the Excel spreadsheet will contain the product data
Screenshot 4
|
| When you run this task, it
reads the values from a database and inserts them one by one into the
Excel spreadsheet. |
Screenshot 1:

Screenshot 2:

Screenshot 3:

Screenshot 4:

|