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.
-
On the Data tab, in the Get External Data group, click From Other Sources.
-
Click From SQL Server.
-
In the wizard, enter the server name and logon credentials, and click Next.
-
Choose the database and tables you want to work with, and click Next.
-
You can click Finish, or click Next to change details for the connection.
-
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.
-
Click the Properties button to set advanced properties for the connection, such as OLAP settings or options for refreshing the connected data.
-
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.
-
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
No comments:
Post a Comment