Want to convert SQL file to Excel file?
If you want to export SQL Server to Excel, see this page: SQL Server to Excel.
If you want to export SQLite to Excel, see this page: SQLite to Excel.
Try Withdata Data File Converter, a desktop SQL to Excel converter for Windows, MacOS, and Linux, Convert SQL to Excel, Easy and Fast.
- Can run in GUI mode, Step by Step, just a few mouse clicks.
- Can run in Command line, for Scheduled Tasks and Streams.
- Convert files locally and privately, avoid uploading large SQL file(s) to online services.
- Support Windows, Linux, and macOS.
Convert SQL to Excel
Choose SQL file -> Set Excel file -> Convert SQL to Excel
“Start a New Convert” for “SQL to Excel”.

Select From “File” “SQL” To “File” “Excel”.

1. Open source SQL file.
Support large SQL file ( > 4GB ).

Source SQL file’s content is like this:

2. Config target Excel file.

3. Set rows options.

4. Convert SQL to Excel.

After converting, you can view the output Excel file.

More about SQL to Excel converter
See Video: Convert SQL file to Excel file in a few clicks
See also:
SQL → EXCEL reference
Type mapping
| Value kind | in SQL | in EXCEL |
|---|---|---|
| Int | INT | 1234 (a real numeric cell) |
| Bigint | BIGINT | 9007199254740993 (exact only while the cell stays text) |
| Decimal | DECIMAL(p,s) | 1234.56 (numeric cell, format controls the displayed decimals) |
| Float | DOUBLE PRECISION | 1.234E+10 (numeric cell) |
| Text | VARCHAR(n) | text cell; leading zeros survive only if the column is text |
| Long text | TEXT / CLOB | text cell; wraps inside the cell rather than the row |
| Date | DATE | a serial number plus a date cell format |
| Datetime | TIMESTAMP | a serial number plus a date-time cell format |
| Binary | BLOB / BYTEA | not representable as data |
| Boolean | BOOLEAN / SMALLINT | TRUE / FALSE (a real boolean cell) |
| JSON | JSON / TEXT | a text cell; the quotes are part of the value |
Dialect differences
Both SQL and EXCEL are file formats, so what differs below is how each one chooses to represent a value.
| Property | in SQL | in EXCEL |
|---|---|---|
| identifiers | Two competing conventions: single-quoted literals and diale... | Not applicable; a cell holds exactly one value |
| dates | Depends on the dialect: DATE literals, TO_DATE(), or plain ... | Stored as a serial number; only the cell format makes it lo... |
| binary | Dialect-specific: X-quoted literal, 0x hex, or decode() | Only as text or an embedded object, not as a data column |
| separator | Statement terminators (;) | Cells, not delimiters |
| encoding | No declaration | UTF-8 internally, declared in the package |
| typing | Types belong to the target database, and they differ betwee... | Real cell types: text, number, date, boolean, error |
| shape | Statements; a dump usually means CREATE TABLE plus INSERT rows | Multiple sheets, each a flat grid |
| ceiling | No formal limit, but a single INSERT statement has to fit i... | 1,048,576 rows x 16,384 columns per sheet; 255 sheets per w... |
Convert SQL to Excel the easy way
Use the SQL to Excel converter — an offline desktop app for Windows, macOS and Linux. Nothing to upload, large files and batch runs supported (free trial).
