SQL Server Linked to Excel


You can link Excel to a SQL Server database so that you can read data from SQL Server tables and view them in Excel worksheets. You will have a read-only link in Excel. You are importing SQL Server into Excel. When the database tables change, you just need to click the Refresh button in Excel to update the data. This makes it mush easier to view the data and copy it. Since you are in Excel, you can filter the rows and you can search for a specific value or values in a column.

Set up a Link

  1. Open an Excel file
  2. Click the Data tab in Excel
  3. Click Get External Data From Other Sources
  4. Choose From SQL Server, which is the first one.
  5. Enter the Server Name
  6. Select your Log on credentials, click Next
  7. From the drop-down, select the database you need (RBCxml)
  8. Click on the table you want to view. You can repeat this entire process for each table you want.
  9. Save Connection and Finish
  10. Import Data: leave it set to Table and click the New Worksheet radio button and click OK
  11. It creates a new worksheet. Rename your worksheet to reflect the table name.
  12. In the Data tab, click Refresh All.

Here are a few specific details about step 9, Save Connection and Finish.

  1. File Name: leave it but click Browse and choose a Location
  2. Description: enter a description
  3. Friendly Name: remove the server name, keep the rest
  4. Click Finish

Additional Comments

  • To get the server name, open SQL Server Management Studio (SSMS) and click the New Query button and Execute SELECT @@servername
  • If Windows authentication does not work, you will need to get the username and password from your SQL Server Administrator.

Leave a comment

Your email address will not be published. Required fields are marked *