Convert SQL to XLS
Turn SQL files into XLS files. The tables the script creates are loaded first, with a dump from MySQL, MariaDB or PostgreSQL rewritten into SQLite's dialect.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop SQL files on the dialor turn it to pick what to do
One workbook per table in your SQL script.Each table becomes its own XLS file with one sheet, named after the table.
What you get
The tables the script creates are loaded first. A dump from MySQL, MariaDB or PostgreSQL is rewritten into SQLite's dialect before loading. Each table then becomes one workbook, named after it, with a single sheet.
Numbers, dates and times become typed cells. Codes with a leading zero stay text, so the zero is not lost.
What changes
Dates that are not real dates, such as MySQL's 0000-00-00, are left empty. PostgreSQL true and false become 1 and 0.
Views, functions and triggers are left out with a warning. Only the tables and their rows are converted.
Limits of the XLS format
The Excel 97-2003 format holds at most 65,536 rows and 256 columns per sheet. Rows past 65,536 and columns past 256 are dropped without a warning, so a large table can lose data and you will not be told.
If a table is bigger than that, check the row and column counts of the source against the workbook. For all the other ways to produce this format, see every XLS conversion.
SQL and XLS.What each format is.
The formats
SQL Script
SQL statements as text. A database dump that any SQL tool can read or replay.
- Extensions
- .sql
- MIME type
- application
/sql - Kind
- Text and data
Excel 97-2003 Workbook
The binary Excel workbook format from Excel 97 through 2003, and its templates (.xlt). WPS Spreadsheets saves the same format as .et and .ett.
- Extensions
- .xls .xlt .et .ett
- MIME type
- application
/vnd .ms -excel - Kind
- Documents
In your code.The same SQL to XLS conversion through the API, for your app or your agent.
$ cv convert report.sql report/ --to xls$ cv convert report.sql report/ --to xlsQuestions.What people ask about SQL to XLS.
Not always. Each table the script creates gets its own workbook, with one sheet named after the table. A script with several tables gives several files.
Yes. Dumps from MySQL, MariaDB and PostgreSQL are rewritten into SQLite's dialect before the tables are loaded.
They are not real dates, so the cell is left empty.
No. They are left out with a warning. Only the tables are turned into workbooks.