SQL Server has the best native Excel story of any database, but it is Windows desktop only. Mac, web Excel, and scheduled refresh need a different path.
SQL Server has the best native Excel connection story of any database. Microsoft built the connector directly into Windows desktop Excel, no extra drivers required, and it works with both on-premises SQL Server and Azure SQL Database. The catch is the same as every other driver-based approach: it is Windows desktop only. Mac users, anyone running Excel on the web, and teams that want data to refresh on a schedule all need a different path. Here is every method, with the limits each one carries.
Method 1: Get Data, From SQL Server Database (the best native option)
In Windows desktop Excel, go to Data, Get Data, From Database, From SQL Server Database. Enter the server name or IP address (include the instance name if needed, for example MYSERVER\SQLEXPRESS), then choose the database. Pick Windows authentication to use your domain credentials, or SQL Server Authentication to enter a username and password. Power Query loads the table list and lets you pick tables, write a native SQL query under Advanced Options, or join multiple tables before loading.
For Azure SQL Database, enter the fully qualified server name from the Azure portal, for example yourserver.database.windows.net. Before connecting, add your machine's public IP to the Azure SQL firewall: Azure portal, SQL Server resource, Networking, Firewall rules, Add client IP. Without this rule, connections time out silently.
The catch: Windows desktop Excel only. This option does not appear in Excel for Mac or in Excel on the web.
Method 2: ODBC with the SQL Server driver
Windows ships with a SQL Server ODBC driver pre-installed. Open ODBC Data Sources from Control Panel, create a System or User DSN, choose SQL Server or ODBC Driver for SQL Server from the driver list, and enter the server and authentication details. In Excel, go to Data, Get Data, From Other Sources, From ODBC and pick the DSN. Power Query wraps the ODBC connection and lets you write SQL in the advanced options.
The catch: Windows desktop only, and the 32-bit vs 64-bit architecture must match between the DSN and your Excel install. ODBC is mostly useful when your organisation manages shared DSNs centrally or when a legacy system expects an ODBC data source. For new setups, the native SQL Server connector under Get Data is simpler.
Method 3: Copy-paste from SSMS results grid
Run a query in SQL Server Management Studio or Azure Data Studio, select the results (Ctrl+A), copy, and paste into Excel. Column headers come across if you right-click and choose Copy with Headers in SSMS. This works on any machine where SSMS is installed, and the resulting data lands in whichever Excel is open, including on a Mac if you paste into Excel for Mac.
The catch: completely manual. There is no connection to refresh. It is useful for ad-hoc queries or when you need a fast answer without setting up a Power Query connection, not for anything that needs to be repeated.
Method 4: Brooked for Excel (Mac, web, and scheduled refresh)
Brooked for Excel is an add-in that connects to SQL Server (on-premises or Azure SQL) and pulls the tables or query results you choose into the worksheet. It runs inside Excel's ribbon and works in desktop Excel on Windows, desktop Excel on Mac, and Excel on the web. The AI analyst lets you ask plain-English questions about the data without writing SQL.
Honest framing: Excel support is in beta. Manual imports and the AI analyst work today; scheduled refresh is rolling out through the beta. The Google Sheets version of the connector is fully live, so the SQL Server plumbing itself is mature.
Setting up the SQL Server connection
Open Brooked in the Excel ribbon, choose SQL Server as the source, and enter the server name or hostname, port (default 1433), database name, and credentials. For Azure SQL, enter the yourserver.database.windows.net address and confirm the firewall rule is in place. Pick the tables or write a query, choose the destination sheet, and import.
Method comparison
| Method | Cost | Works on | Refresh | Best for |
|---|---|---|---|---|
| Get Data, From SQL Server Database | Free, built-in | Windows desktop Excel only | Refresh All in Power Query | Windows teams with direct DB access |
| From ODBC (SQL Server driver) | Free, driver built into Windows | Windows desktop Excel only | Refresh All in Power Query | Legacy setups or shared DSNs |
| Copy-paste from SSMS results grid | Free | Any Excel (paste target) | Manual re-run and paste | Quick one-off query results |
| Brooked for Excel | Free during beta | Desktop, Mac and web Excel | Scheduled (rolling out in beta) | Mac, web Excel, and scheduled refresh |
What teams build with this
- Sales dashboards pulling from a SQL Server CRM database, refreshed each morning before standup
- Finance month-end close packets with revenue, cost, and margin tables from a data warehouse
- HR headcount reports from a SQL Server HRIS, showing active headcount by department and location
- Operations reports joining inventory and order tables for a daily on-hand snapshot
- Executive KPI sheets connecting to Azure SQL Database, accessible from any device via Excel on the web
Troubleshooting common issues
Related Articles
- How to Connect MySQL to Excel
- How to Connect PostgreSQL to Excel
- How to Connect SQL Server to Google Sheets
Frequently asked questions
Does Excel have a built-in SQL Server connector?
Yes. Windows desktop Excel includes a native SQL Server connector under Data, Get Data, From Database, From SQL Server Database. You enter the server name, choose Windows or SQL Server authentication, and Power Query pulls the schema. It is the cleanest native database story Excel offers for any database type. The limitation is that it works only on Windows desktop Excel.
Can I connect SQL Server to Excel on a Mac?
Not with the native Get Data connector or ODBC. Both require the Windows version of Excel and Windows ODBC drivers. On a Mac, your options are exporting CSV from SSMS or Azure Data Studio and opening it in Excel, or using an add-in like Brooked that supports Excel for Mac natively.
Can I connect SQL Server to Excel on the web?
Not directly. Excel on the web has no Get Data panel that can reach a database. You need a manual export or an add-in. Brooked for Excel works in the web version and can pull data from SQL Server.
Does the SQL Server connector work with Azure SQL Database?
Yes. Use the Azure SQL server name (your-server.database.windows.net) as the server in the Get Data dialog, and make sure the Azure SQL firewall has an inbound rule for your machine's IP address. You can find this under the Azure portal, SQL Server resource, Networking, Firewall rules. SQL Server authentication or Azure Active Directory credentials both work.
Can I refresh SQL Server data in Excel automatically?
Refresh All in Power Query re-runs the query on demand, but it requires someone to open the workbook and click the button, or a macro running on a Windows machine that stays awake. There is no built-in timer in Excel. For hands-off scheduled refresh you need an add-in. Brooked is rolling that out through its beta.
Why does my SQL Server connection say login failed?
The most common causes: SQL Server Authentication is disabled (only Windows Auth is on), the SQL user does not have access to the specific database, or the server name is wrong. In SSMS, check Server Properties, Security to confirm the authentication mode. Also verify the login exists under Security, Logins and has a user mapped to the target database. For Azure SQL, check that the firewall rule covers your IP.
How do I get data from a SQL query into Excel?
Three paths. In Windows desktop Excel, go to Data, Get Data, From Database, From SQL Server Database, then click Advanced Options to paste a SQL statement directly into the connection. In SSMS, run your query, select the results, right-click, Copy with Headers, and paste into Excel. For Mac or web Excel, use Brooked for Excel: connect to SQL Server, write your query, and import the results into the active sheet.
Get live SQL Server data in Excel, on any platform.
Brooked for Excel is in beta and free to try. Using Google Sheets instead? Read the Sheets version of this guide.
See Brooked for Excel →

