SQL to Excel Converter
Hand a dump file to someone who works in spreadsheets. Each column arrives in Excel as one type, the header row is frozen, and the widths already fit.
To convert SQL to Excel, paste your INSERT statements above and download the .xlsx. Each row becomes a spreadsheet row and each column is written with a single cell type: real numbers, real TRUE and FALSE cells, real dates formatted yyyy-mm-dd, and text for anything that must keep its exact spelling. The workbook is built in your browser and never uploaded.
Need to filter or add a column first? Open the app
The green triangle problem
If you have ever pasted data into Excel and watched half a column pick up the little green "number stored as text" warning, you have met the bug this page is built to avoid. It happens when a converter types each cell on its own: 94043 looks like a number so it becomes one, 01730 does not so it stays text, and now the column has two types in it.
A mixed column cannot be sorted properly, cannot be filtered as a range, and will not match in a VLOOKUP against a column that is all one type. It is the single most common way a perfectly good export wastes somebody's afternoon.
Here the type is decided once, from the whole column, before a single cell is written. If any value in the column needs to stay text, every value in it is text and every one keeps its exact spelling. If they all survive as numbers, the whole column is numeric and sums correctly.
Worked example: what lands in each cell
A short dump with one of every hazard in it:
INSERT INTO orders (order_id, region_code, customer, units, revenue, paid, placed_on) VALUES
(4101, '01', 'Ada Lovelace', 12, 1840.50, TRUE, '2026-01-08'),
(4104, '03', 'Katherine Johnson', 1, 92.40, FALSE, '2026-01-15');
And what Excel receives, column by column:
- order_id numeric cells. Every value is an exact integer, so the column sums and sorts.
- region_code text cells, holding
01and03. One padded value makes the whole column text, which is what keeps the zero. - customer text, unremarkable, and the apostrophe in a name like O'Hara needs no escaping in a real workbook.
- units numeric.
- revenue text, because
1840.50would come back as 1840.5. If you want it numeric, cast it in your query or fix the trailing zero in the dump. - paid genuine boolean cells showing TRUE and FALSE, not the four letters. COUNTIF works on these; it does not work on text.
- placed_on real date cells formatted
yyyy-mm-dd, so a date filter and a date axis both work.
How the date cells are built
Excel stores a date as a number of days since 30 December 1899, and the usual way to produce one in a browser is to make a JavaScript Date and hand it to a library. That is how dates move by a day: the Date is interpreted in the visitor's timezone, and anyone west of Greenwich gets the day before.
So no Date object is involved. The serial is computed by arithmetic on the year, month and day, in UTC, and written directly with a yyyy-mm-dd number format. The value in the cell is an integer and it is the same integer on every machine.
Only an exact YYYY-MM-DD counts as a date. 03/04/2025 is left as text, because whether that is March or April depends on which country wrote it and guessing wrong is worse than not guessing. A timestamp with a time and an offset is also left as text, for the same reason: the offset question has no safe default.
If you would rather have the exact string in every cell, the "ISO dates" switch turns the whole behaviour off.
The bits you would otherwise do by hand
- Sheet name. The workbook's sheet is named after the SQL table, so a dump of
ordersopens on a sheet called orders rather than Sheet1. Override it in the options; Excel's illegal characters are stripped and the 31-character limit is applied for you. - Frozen header. The header row is frozen by default, which is the first thing anyone does to a fresh export.
- Fitted widths. Every column is sized to its widest value, capped so a long note does not push the sheet off the screen. A cell with a line break is measured by its longest line, not its total length.
- Filter dropdowns. Off by default because they change how the sheet prints, one switch away when you want them.
Several tables, one workbook at a time
A dump with a lookup table and a fact table gives you two entries in the picker under the result. Each converts to its own workbook. There is no option to put both on separate sheets of one file, because the two tables in a dump almost never belong in one workbook and the ones that do usually need a join rather than two tabs.
If you do want them joined, take both to the full editor. It reads SQL dumps too and it can run an actual join across them before you export.
Frequently Asked Questions
Is this a real .xlsx or a CSV with a different extension?
A real workbook, written with the same library Excel-compatible tools use. It opens with a double click, with no import wizard, no warning bar and no delimiter question. That is also why the cells can carry types at all, which a CSV cannot.
Why does one column arrive as text when it looks numeric?
Because at least one value in it would change if it were written as a number, usually a leading zero or a trailing zero after a decimal point. The whole column then stays text so it is consistent. A column where every value survives exactly is written as numbers.
Do TRUE and FALSE arrive as real booleans?
Yes, as boolean cells, which is what makes COUNTIF and a filter behave. Many converters write the text "true" instead, and a formula cannot tell that apart from a customer whose name happens to be true.
How are dates handled?
An exact YYYY-MM-DD becomes a real date cell formatted yyyy-mm-dd, with the serial computed by UTC arithmetic so no timezone can shift it by a day. Ambiguous formats like 03/04/2025 and timestamps carrying an offset stay text. A switch turns the whole behaviour off if you want the literal strings.
What name does the sheet get?
The SQL table's own name, cleaned of the characters Excel refuses and trimmed to the 31-character limit. You can type your own in the options. It is a small thing that saves renaming Sheet1 on every export.
Is there a row limit?
Excel's own limit is 1,048,576 rows and this does not add one below it. The widget takes files up to 100 MB; past that the full editor streams and handles considerably more. Nothing is uploaded at any size.
Send the rows to someone who lives in Excel
Typed cells, a frozen header, fitted widths and the table's own name on the tab.
Back to the converter