Connecting to Microsoft SQL Server

Connecting to Microsoft SQL Server

The SaveToDB add-in enables connections to SQL Server tables, views, stored procedures, and table functions.

It supports:

  • Microsoft SQL Server 2005 or higher
  • Microsoft SQL Server Express LocalDB
  • Azure SQL Database
  • Azure SQL Data Warehouse

The SaveToDB add-in works with the following data providers:

  • OLE DB providers
  • ODBC drivers, including DSN files
  • .NET Framework Data Provider

Microsoft Office installs the Microsoft OLE DB Provider for SQL Server, which simplifies sharing workbooks with other users.

However, this OLE DB provider may not support the latest SQL Server data types and authentication methods. You can download and install the latest SQL Server OLE DB providers or ODBC drivers for improved compatibility.

You can also use the .NET Framework Data Provider, but note that Microsoft Excel does not support .NET Framework Data Providers. Unlike OLE DB providers and ODBC drivers, data connected via .NET providers can only be reloaded using the SaveToDB add-in.

Below is a sample of the Database Connection Wizard page where you can select the data provider:

Connecting Excel to Microsoft SQL Server Database - Selecting Provider

Connecting to SQL Server Databases

Use the following server name format for Microsoft SQL Server:

<Server name or IP-address>[,<Port>][\<Instance name>]

Here’s a sample of the database connection page:

Connecting Excel to Microsoft SQL Server Database

When a user specifies the server and login credentials, the add-in attempts to load a list of available databases.

Here’s an example of connecting to a local server on port 1433:

Connecting Excel to Microsoft SQL Server Database

Below is a sample connection to a named instance, SQLEXPRESS:

Connecting Excel to Microsoft SQL Server Database

Here’s an example of connecting to a file database using Microsoft SQL Server Express LocalDB. Use the Browse button to select a file.

Connecting Excel to SQL Server Express LocalDB File Database

The add-in allows you to use attached files as regular databases, as shown in the database list below:

Connecting Excel to SQL Server Express LocalDB Attached File Database

Connecting to a file can be advantageous because the database can be detached when needed.

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.