Connect a SQL Server database to your workbook

Databases are great for storing information, but sometimes you want to use or analyze its data in Excel. You can use the Data Connection Wizard to create a dynamic connection between a SQL Server database and your Excel workbook. You get to the Data Connection Wizard through the Data tab.

  1. On the Data tab, in the Get External Data group, click From Other Sources.

Get External Data group on Data tab

  1. Click From SQL Server.

  2. In the wizard, enter the server name and logon credentials, and click Next.

  3. Choose the database and tables you want to work with, and click Next.

  4. You can click Finish, or click Next to change details for the connection.

  5. In the Import Data dialog box that appears, choose where to put the data in your workbook and whether to view the data as a table, PivotTable report, or PivotChart.

  6. Click the Properties button to set advanced properties for the connection, such as OLAP settings or options for refreshing the connected data.

  7. Optionally, you can add the data to the Data Model so that you can combine your data with other tables or data from other sources, create relationships between tables, and do much more than you can with a basic PivotTable report.

  8. Click OK to finish.

Important: Connections to external data might be disabled on your computer. To connect to data when you open a workbook, enable data connections by using the Trust Center bar, or save the workbook in a trusted location.

Keep the data in your workbook up to date

Now that you're connected to your SQL Server data, you'll always want the latest data in your workbook. Go to Data > Refresh All to get the latest data. For more information on refreshing, go to refresh SQL Server data.

Connect to other types of data sources

Need to connect to other sources of data, such as OLE DB, Microsoft Azure Marketplace data feeds, Access, another Excel workbook, a text file, or one of many other types? See the following articles for more information.

Connect OLE DB data to your workbook

Connect a Microsoft Azure DataMarket feed to your workbook

Connect an Access database to your workbook

Connect data in another workbook to your workbook

Connect external data to your workbook

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!