Withdata Software

Convert Excel to SQL

Want to convert Excel file to SQL file?

If you want to import Excel file to SQL Server, see this page: Excel to SQL Server.

If you want to import Excel file to SQLite, see this page: Excel to SQLite.

Try Withdata Data File Converter, a desktop Excel to SQL converter for Windows, MacOS, and Linux, Convert Excel to SQL, Easy and Fast.

Download Withdata DataFileConverter
Windows 64 bit
Windows 32 bit
Linux .deb (For Debian, Ubuntu) 64 bit
Linux .rpm (For Red Hat, Fedora, SUSE) 64 bit
MacOS 64 bit

Convert Excel to SQL

Choose Excel file -> Set SQL file -> Convert Excel to SQL

“Start a New Convert” for “Excel to SQL”.

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

1. Open source Excel file.

Support large Excel file ( > 4GB ).

Source Excel file’s content is like this:

2. Config target SQL file.

3. Set rows options.

4. Convert Excel to SQL.

After converting, you can view the output SQL file.


More about Excel to SQL converter

See Video: Convert EXCEL file to SQL file without coding

See also:

EXCEL → SQL reference

Type mapping

Value kindin EXCELin SQL
Int1234 (a real numeric cell)INT
Bigint9007199254740993 (exact only while the cell stays text)BIGINT
Decimal1234.56 (numeric cell, format controls the displayed decimals)DECIMAL(p,s)
Float1.234E+10 (numeric cell)DOUBLE PRECISION
Texttext cell; leading zeros survive only if the column is textVARCHAR(n)
Long texttext cell; wraps inside the cell rather than the rowTEXT / CLOB
Datea serial number plus a date cell formatDATE
Datetimea serial number plus a date-time cell formatTIMESTAMP
Binarynot representable as dataBLOB / BYTEA
BooleanTRUE / FALSE (a real boolean cell)BOOLEAN / SMALLINT
JSONa text cell; the quotes are part of the valueJSON / TEXT

Dialect differences

Both EXCEL and SQL are file formats, so what differs below is how each one chooses to represent a value.

Propertyin EXCELin SQL
identifiersNot applicable; a cell holds exactly one valueTwo competing conventions: single-quoted literals and diale...
datesStored as a serial number; only the cell format makes it lo...Depends on the dialect: DATE literals, TO_DATE(), or plain ...
binaryOnly as text or an embedded object, not as a data columnDialect-specific: X-quoted literal, 0x hex, or decode()
separatorCells, not delimitersStatement terminators (;)
encodingUTF-8 internally, declared in the packageNo declaration
typingReal cell types: text, number, date, boolean, errorTypes belong to the target database, and they differ betwee...
shapeMultiple sheets, each a flat gridStatements; a dump usually means CREATE TABLE plus INSERT rows
ceiling1,048,576 rows x 16,384 columns per sheet; 255 sheets per w...No formal limit, but a single INSERT statement has to fit i...

Do it online, free

Skip the manual work — convert Excel to SQL online, free (runs in your browser, nothing is uploaded). For large files or batch jobs, use the desktop apps.