Download Article
Download Article
This article will help users to embed SQL Query in Excel 2010 and create a dynamic connection in Excel.
Steps
-
Go to Data tab and select From Other Sources as shown in the screen shot below.
-
Select “From Data Connection Wizard” in the drop down.Advertisement
-
Data Connection Wizard will open. Select “ODBC DSN” from the available option and click “Next”.
-
Connect to ODBC Data Source window appears. Where a list of database available in our organization will be displayed. Select the appropriate database and click on “Next”.
-
Select Database and Table window appears.
-
We can select the database and the table from where we wish to pull the data. So, select the database and table as appropriate in our case.
-
Select Finish in “Save Data Connection File and Finish” window. This window will pull up the File Name based on our selection in previous screens.
-
Import Data window appears where we can select options as per our need and click OK.
-
Select “From Data Connection Wizard” in the drop down.
-
Go to Data tab and Click on Connections. Click on Properties in the following window.
-
Go to Definitions tab in the following window.
-
Write SQL query in “Command Text” and Click OK. Excel will display the result as per the query.
-
Now go to Microsoft Excel and validate if the results are as per the SQL Query written.
Advertisement
Expert Q&A
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
About This Article
Thanks to all authors for creating a page that has been read 386,664 times.
Advertisement