Convert SQL to XLS
Export database query results to an editable legacy Excel workbook.
Convert SQL files online
We don’t have a dedicated online converter for SQL to XLS yet, but you can convert SQL files online to these and more formats:
Want to convert SQL to XLS?
Let us know. We pick the conversions to add next by how many people ask for them.
How to convert sql to xls file
- Documents
- No ratings yet.
Teams commonly need spreadsheet copies of query results to share with colleagues who use Excel or systems that accept only the legacy .xls format. The conversion is an export of selected database results, not a direct change of the SQL script into a workbook.
What the SQL format is
A .sql file is plain text containing SQL statements, such as commands to create tables, insert records, or retrieve data. Database administrators and developers use these scripts to define or modify databases and run queries. A script may depend on a particular database engine, existing schema, and permissions; it is not necessarily a ready-made table of spreadsheet rows.
What the XLS format is
.xls is the Excel 97–2003 workbook format. It stores editable worksheets with cells, formulas, and formatting, and is supported by Excel and other spreadsheet programs. Each worksheet is limited to 65,536 rows and 256 columns, so larger results need multiple sheets or a newer format such as .xlsx.
How to export SQL results to XLS
Navicat Premium is a suitable offline option when it supports the database engine and SQL dialect used by the script:
- Connect Navicat to the correct database. Run scripts that change data only on a test or restored copy unless changes to the live database are intended.
- Open the SQL file in Navicat’s query editor, select the matching connection and database, and execute the script. Resolve errors such as unsupported syntax, missing tables, or insufficient permissions. If the script only creates or populates tables, run a separate
SELECTquery to choose the rows to export. - Export the required table or query result with Navicat’s Export Wizard. Choose Excel and, if available, the Excel 97–2003 format; save the output with an
.xlsextension. Export separate result sets separately. - If the installed Navicat version does not offer
.xls, export as CSV, open the CSV in Excel, check the import delimiter and character encoding, then choose File → Save As and select Excel 97–2003 Workbook (*.xls).
A general-purpose online converter is not a reliable choice for an arbitrary SQL script: the script must be interpreted by a compatible database before its results can be exported. Avoid uploading database dumps containing confidential data to conversion sites.
Quality and compatibility
The workbook contains the exported rows, not the SQL commands, schema, indexes, relationships, or database logic. Check how the export represents NULL values, dates, decimals, and text identifiers with leading zeros; spreadsheet software may reinterpret values, and Excel retains only 15 significant digits in numeric cells. Confirm that the result fits the XLS row and column limits before exporting; use .xlsx or split the data when it does not.
SQL vs XLS: format comparison
How the SQL and XLS formats compare on the properties that matter most for this conversion.
| Property | .SQL Structured Query Language script | .XLS Microsoft Excel Spreadsheet |
|---|---|---|
| Open standard | Partly open | No |
| Compression | Uncompressed | Both |
| Typical file size | Small | Medium |
| Opens in a web browser | No | Partial |
| Further editing | Easy | Limited |
| Metadata support | Basic | Basic |
| Plain-text readable | Yes | No |
| Best used for | Data exchange | Data exchange |
| Introduced | 1970 | 1987 |
| Developer | — | Microsoft |
| MIME type | application/sql | application/vnd.ms-excel |
Information about file extensions and file types is provided by File-Extensions.org
Suggested software and links: sql to xls converters
Additional formats for
sql file conversion
Reverse conversion
Convert to xls from
other formats
- qrp to xls
- dat to xls
- prnx to xls
- qpw to xls
- csv to xls
- et to xls
- xlsx to xls
- odb to xls
- ots to xls
- arff to xls
- 123 to xls
- _xls to xls
- aws to xls
- bak to xls
- cht to xls
- cwk to xls
- dif to xls
- doc to xls
- docx to xls
- dqy to xls
- ecsv to xls
- ett to xls
- excel to xls
- fods to xls
- fr3 to xls
- gct to xls
- gif to xls
- gsheet to xls
- hst to xls
- htm to xls
- html to xls
- imd to xls
- ios to xls
- iwa to xls
- jpeg to xls
- jpg to xls
- jrprint to xls
- json to xls
- lvm to xls
- mpp to xls
- nbib to xls
- numbers to xls
- odf to xls
- ods to xls
- odt to xls
- oxps to xls
- pages to xls
- pdf to xls
- pmd to xls
- pmv to xls
- png to xls
- por to xls
- prn to xls
- prt to xls
- pxl to xls
- qdf to xls
- rpt to xls
- rtf to xls
- sbp to xls
- sdc to xls
- sdw to xls
- shp to xls
- shs to xls
- skv to xls
- slk to xls
- spbm to xls
- spo to xls
- stw to xls
- sxc to xls
- tbl to xls
- tmp to xls
- txt to xls
- uos to xls
- vsd to xls
- wb1 to xls
- wb2 to xls
- wb3 to xls
- wbd to xls
- wdb to xls
- wk! to xls
- wk1 to xls
- wk3 to xls
- wk4 to xls
- wkq to xls
- wks to xls
- wkz to xls
- wmf to xls
- wps to xls
- wq1 to xls
- wq2 to xls
- wr1 to xls
- wri to xls
- xlc to xls
- xlk to xls
- xlsb to xls
- xlsm to xls
- xlt to xls
- xltm to xls
- xltx to xls
- xlw to xls
- xml to xls
- xps to xls