SQL Server to Excel: Export Results or Connect Excel Directly
Last updated August 29, 2026 · By the SaturnSQL team
“SQL Server to Excel” hides two different jobs: exporting a result set as a file, and wiring Excel to the database so a workbook refreshes itself. This guide covers both, including the SSMS limitation that surprises everyone the first time.
The short version
For a file, use a client that writes a genuine .xlsx workbook; SSMS itself only saves CSV from the grid. For a self-refreshing workbook on a machine with database access, connect Excel with Power Query. For a report that other people need without VPNs or credentials, schedule the query into a shared destination instead. The general tradeoffs are in the export SQL to Excel guide.
Method 1: a one-click .xlsx download
SaturnSQL is a browser-based SQL editor. Connect SQL Server (Azure SQL, Amazon RDS, and self-hosted MSSQL all work) with a read-only user, run the query, open the export menu above the results grid, and pick XLSX. The file is a real workbook: numbers stay numbers, dates stay dates, and Excel opens it without an import dialog. On SQL Server the export is buffered and capped at 100,000 rows; if you need more than that in one file, use bcp below.
Method 2: SSMS, and why the grid won’t give you .xlsx
Right-click the SSMS results grid, choose “Save Results As”, and the only formats offered are CSV and text. SSMS cannot export the results grid to Excel directly. The supported route is the Import and Export Wizard: right-click the database → Tasks → Export Data → destination Microsoft Excel.
Two things bite people here. The Excel destination comes from the Microsoft Access Database Engine (ACE OLEDB), a separate download that must match your SSMS bitness, so 64-bit SSMS with a 32-bit engine simply won’t list Excel. And the wizard is strict about types: one unmappable column, usually a wide nvarchar or a datetime2, fails the whole transfer.
Method 3: bcp and sqlcmd for scripts
For scheduled jobs on a server, bcp writes delimited files of any size without a GUI:
bcp "SELECT id, name, created_at FROM mydb.dbo.customers" \
queryout customers.csv -c -t"," -S db.example.com -U reportThe output is CSV, not .xlsx, so Excel type-guesses every column on open: leading zeros, long IDs, and date-shaped strings are at risk, exactly as described in the general guide.
Method 4: connect Excel to SQL Server with Power Query
The other direction: instead of pushing a file out of the database, let Excel pull. In Excel, go to Data → Get Data → From Database → From SQL Server Database, enter the server and database, and pick a table or paste a SQL statement. Power Query loads the rows into the workbook, and Data → Refresh All re-runs it whenever you like.
This is the right tool when the workbook lives on a machine with network line-of-sight to the server, on the office LAN or a VPN, and the person refreshing it has database credentials. It stops being the right tool the moment the report needs to reach people without either: every reader of the workbook needs the same network path and access, and a copy mailed around goes stale the moment it is sent.
Method 5: stop exporting, schedule it
For the recurring report that people without database access need to see, schedule the query where the readers already are. In SaturnSQL you save the query, attach a schedule with a cron cadence and an IANA timezone, and each run writes the fresh rows to the destination. Hourly refresh is included in the €19/mo base plan.
Where scheduled runs deliver
Scheduled runs deliver to a Google Sheet or to Slack. SaturnSQL does not email an .xlsx attachment on a timer. For Excel users a Sheet is one click away (File → Download → Microsoft Excel (.xlsx)), and the URL stays stable, so pivot tables and formulas pointing at it keep working run after run. The full setup is in the SQL Server to Google Sheets guide.
Frequently asked questions
How do I export SQL Server query results to Excel?
SSMS only saves CSV from the grid. For a genuine .xlsx, use a client that writes one (SaturnSQL exports from the browser, capped at 100,000 rows on SQL Server) or the Import and Export Wizard with the Access Database Engine installed.
How do I connect Excel to SQL Server directly?
Data → Get Data → From Database → From SQL Server Database. Power Query pulls the table or query into the workbook and refreshes on demand. It needs network access to the server and credentials, so it suits a LAN or VPN, not sharing.
How do I export SQL Server to Excel automatically?
Put the saved query on a schedule. SaturnSQL runs it on a cron cadence and writes the rows to a Google Sheet or Slack; the Sheet is one click from an .xlsx download and the link stays stable. Scheduled delivery is to Sheets or Slack, not an emailed attachment.
Why doesn’t the wizard show Excel as a destination?
The Excel destination is provided by the Microsoft Access Database Engine (ACE OLEDB), a separate download whose bitness must match SSMS. 64-bit SSMS with a 32-bit engine installed will not list Excel at all.
Export a real .xlsx from SQL Server in one click, or put the query on a schedule and stop exporting it at all.