Wednesday, August 26, 2009

Access oracle database from MS excel

For preparing reports where multiple queries are to be executed and output to be updated in the excel, it’s better to connect the excel to database, so that queries we can automatically update the data directly in the excel sheet.

The following steps are to be followed to connect tot the database.

1) Open a new excel sheet.

2) Select Data→Import External Data→Import Data

3) A dialog box will be opened to create /select a data source.
4) Click on “New Source” button on the bottom of the dialog box.

5) “Data Connection Wizard” dialog box will appear on the screen.

6) Select “Oracle” and then click Next.

7) You would be requested to key in the DB server details.
8) Enter the details and click Next.

9) “Data Connection Wizard” dialog box will let you to connect to the default table. Uncheck the check box if you don’t want to connect to a specific table. Click Next

10) Enter the name for the connection source and click Finish.
11) Now it has connected to the database and you would be prompted to select the connection source. Select the newly created source.

12) You would be prompted to enter the server credentials. Type it and press enter.

13) “Edit OLE query library” screen will appear. Select SQL and type the query, then click the OK button.

14) The data range can be selected by the user and then click OK.

15) The data will be populated in the sheet. An “External Data” tool box will pop up on the screen.

16) Use the tools in that tool box to get the desired results.









1 comment:

Karthikeyan said...

Sequentially arranged snapshots... and helpful

Powered By Blogger