Excel workbooks as source and destination
How DBConvert for Excel reads a workbook into tables, and writes tables into a new workbook.
Last updated November 5, 2026
DBConvert for Excel converts between Excel workbooks and MySQL, SQL Server, or PostgreSQL. Every run has a workbook at one end. To connect the workbook, see Source and destination connections.
- Files it opens
- When the workbook is the source
- Column types from a workbook
- When the workbook is the destination
- When a table does not fit in Excel
- What is not converted
Files it opens
- DBConvert reads and writes
.xlsxfiles itself. Microsoft Office and an Excel driver are not needed. - An
.xlsfile does not open. Save it as.xlsxin Excel, then select the copy.
When the workbook is the source
- Each sheet is a table.
- The first row of a sheet holds the column names. This cannot be changed.
- A sheet with nothing in it is not listed.
- Empty rows are skipped.
- An empty cell becomes NULL.
- A column with no name gets one, such as
Field2. - Two column names that differ only in case get a suffix, such as
Name_2. - A date is recognised by the cell's number format. Workbooks that use the 1904 date system are read correctly.
- A TRUE or FALSE cell arrives as the text
TRUEorFALSE. - An error cell, such as
#N/Aor#DIV/0!, arrives as NULL. The run log names each one. - Sheets are read one row at a time. A sheet of 1,048,576 rows is read like any other.
Column types from a workbook
The type of each column is chosen from all the values in it. Review or change any column's type on the Customization step before the run.
| Values in the column | MySQL | SQL Server | PostgreSQL |
|---|---|---|---|
| Whole numbers | INT | INT | integer |
| Whole numbers past 32 bits | BIGINT | BIGINT | bigint |
| Fractions | DECIMAL(p,s) | NUMERIC(p,s) | numeric(p,s) |
| Numbers Excel shows with an exponent | DOUBLE | FLOAT | double precision |
| Dates without a time | DATE | DATE | date |
| Dates with a time | DATETIME | DATETIME | timestamp |
| Text, or a mix of kinds | LONGTEXT | NVARCHAR(MAX) | text |
For fractions, the precision and scale are wide enough for every value in the column.
When the workbook is the destination
- The run writes a new
.xlsxworkbook. - A workbook already at that path is replaced. The application warns before the run.
- Sheets are not added to an existing workbook.
- Each table becomes one sheet, named after the table.
- A table name Excel cannot use is changed to a valid sheet name. That covers names over 31 characters, names with
[ ] : * ? / \, and duplicates. - The first row holds the column names.
| In the database | In the workbook |
|---|---|
| Numbers | Numbers |
| Numbers with more than 15 significant digits | Text, with every digit |
| Dates and date-times | Excel dates, with a date format applied |
| PostgreSQL booleans | TRUE or FALSE |
| Text | Text |
| NULL | An empty cell |
MySQL zero dates, such as 0000-00-00 | Their text |
MySQL TIME values over 24 hours | Their text |
Keys, indexes, and constraints are not written. A workbook holds tables, columns, and rows only.
When a table does not fit in Excel
A table or value over an Excel limit is refused by name. Nothing is cut short.
| Excel limit | Value |
|---|---|
| Data rows per sheet | 1,048,575 |
| Characters per cell | 32,767 |
What is not converted
Only the data in the cells is converted. Formulas, formatting, charts, pivot tables, data validation, macros, and VBA are not.