Why convert Excel to SQL?
Spreadsheets are how teams share data—databases need SQL. For test seeds, legacy migration, or CSV → bulk INSERT without a full ETL, follow this workflow, then open the free Excel to SQL tool to generate scripts.
Page roles: This article explains the workflow. The tool does the conversion. Need INSERT-only tips? See Excel to INSERT guide. SQL Server specifics: Excel to SQL Server.
Step 1: Prepare your spreadsheet
| Rule | Detail |
|---|---|
| Row 1 | Column headers (required) |
| Data | Starts at row 2 |
| Formats | .xlsx, .xlsm, .xltx, .xltm, .csv |
Legacy .xls |
Save as .xlsx first |
| CSV encoding | UTF-8 recommended; BOM auto-detected |
Clean merged headers, duplicate column names, and prefer yyyy-MM-dd dates.
Step 2: Upload and choose statement type
Open Excel to SQL and upload your file. Configure:
- Sheet — pick the worksheet
- Statement type — INSERT / UPDATE / DELETE / SELECT
- Table name — e.g.
dbo.Usersor#TempImport - Database type — SQL Server, MySQL, PostgreSQL, SQLite, or Oracle
Optional: CREATE TABLE, batch INSERT, quoted identifiers.
Step 3: Map columns
Use the mapping matrix: Include columns, SET/WHERE for UPDATE/DELETE, Generate data (GUID/Today) when needed.
Step 4: Generate and run safely
- Generate SQL → copy or download
.sql - Run on a staging database first
- For large files, batch execution inside a transaction
Related pages
| Intent | Page |
|---|---|
| Convert now | Excel to SQL tool |
| Screenshots | Tutorial |
| INSERT deep dive | INSERT guide |
| UPDATE / DELETE | UPDATE · DELETE |
| MySQL / Postgres | MySQL · PostgreSQL |