How to Import Excel into SQL Server, Step by Step
Step 1: Connect to SQL Server
Server, port, database, and Windows or SQL Server authentication. The Test button reports the server version before anything is read.
Step 2: Open the workbook and pick the sheets
The sheet list appears with the used range and a preview. One sheet, several sheets to separate tables, or several sheets merged into one table - which is the usual case for monthly reports.
Why FileToDB instead of an Excel add-in
An add-in lives inside Excel and loads one workbook at a time, from a machine that has Excel and a logged-in user. FileToDB reads the file from outside:
- No Excel needed on the SQL Server side, and no COM automation - the workbook is read as a file.
- A folder of workbooks is one task: the usual case of 12 monthly files into one table.
- Saved and scheduled: the same task runs from Task Scheduler,
cronorlaunchd, so nobody has to open Excel. - Append, replace or upsert - what happens to rows that already exist is a setting.
- Local: the workbook and the SQL Server password never leave the machine.
What an Excel cell becomes in SQL Server
Excel has one cell type; SQL Server has many, so this is where the decisions are:
| In Excel | In SQL Server | What to watch |
|---|---|---|
| text | nvarchar(n) | codes with leading zeros stay text, or 00123 arrives as 123 |
| integer numbers | int / bigint | Excel holds everything as a double, so a 17-digit id is already approximate in the sheet |
| decimal numbers | decimal(p,s) | Excel stores 0.1 as binary floating point - choose the scale deliberately |
| dates | date / datetime2 | a date in Excel is a serial number (45292 is 2024-01-01); the format displayed is not the value |
| TRUE / FALSE | bit | a cell that is empty is not FALSE - decide NULL versus 0 |
| formula results | the cached value | the formula is not transferred, only what the file last calculated |
error cells (#N/A, #DIV/0!) | NULL or skipped | an error cell is not text; it carries no value, so the mapping decides NULL or skip |
| merged cells | the value in the first cell | the merged range repeats nothing; the other cells are empty |
One sheet, many sheets, or a folder?
Three shapes, and all three are the same wizard:
- One sheet into one table - the simple import, header row on, columns mapped.
- Each sheet into its own table - a workbook of monthly tabs becomes a set of tables named after the sheets.
- Many sheets or files into one table - the append case: 12 monthly workbooks, one header, one target table.
The header row drives the mapping; when a sheet's header differs, the run reports it instead of writing columns in the wrong order.
Importing Excel into SQL Server — Quick Facts
- Source formats
- .xlsx, .xls, .xlsb and password-protected workbooks
- Sheet limit
- 1,048,576 rows and 16,384 columns per sheet - a longer table is split across sheets in the source
- Header row
- detected, then editable; can be switched off
- Target
- SQL Server (Windows or SQL Server authentication)
- Modes
- create and copy, append, update or upsert by key
- Excel needed?
- No - the workbook is read as a file, on both the import and the SQL Server side
- Add-in needed?
- No - and that is the point: nothing has to be installed into Excel
Common pitfalls when importing Excel into SQL Server
- A date in Excel is a number:
45292with a date format on it. If the mapping treats it as a number, SQL Server stores 45292; if it treats it as text, it stores the displayed string. Neither is a date. - Leading zeros disappear unless the column is read as text - product codes and ZIP codes are the usual casualties.
- Excel numbers are doubles: a 17-digit identifier was already rounded inside the workbook, so no import setting can restore it.
- Merged cells leave the rest empty: the value lives in the top-left cell of the range, and the rows below arrive as NULL.
- Formula cells carry the last calculated value, not the formula - a workbook that was never recalculated holds stale numbers.
- Error cells (
#N/A,#DIV/0!) have no value: they are skipped or written as NULL, and that is a decision, not a bug. - A sheet can be a report, not a table: totals rows, blank spacer rows and a title above the header all become wrong rows unless the start row is set.
Which searches land here
This page imports Excel → SQL Server. The neighbouring searches below look identical but want statements or another target:
| What you searched | Meaning | Page |
|---|---|---|
| excel to sql server, import excel to sql server, migrate excel to sql server, migrate data from excel to sql server, bulk insert from excel to sql server, import data from excel to sql server automatically | read the workbook, write the SQL Server table | this page |
| excel to sql, excel to sql converter, convert excel to sql, excel to sql server insert query, excel to sql server insert | produce INSERT statements or a .sql file instead of loading a table | Excel to SQL |
| sql server excel add-in, sql server import wizard excel | an add-in inside Excel, or the SSMS wizard - this tool needs neither | this page (no add-in, no SSMS) |
| excel to sql server online, excel to sql server converter free | there is no upload step - the workbook is read from disk | this page (free trial) |
| excel to mysql, excel to postgres, excel to mariadb, excel to sqlite | another database as the target | MySQL / PostgreSQL / MariaDB / SQLite |
| csv to sql server, csv to mssql | a delimited file as the source | CSV to SQL Server |
Two Excel facts decide the import before any mapping: a date is stored as a serial number, and every number is a double - so ids and money need a deliberate decision rather than a default.
Verify three things after the first import
- Row count per sheet: compare with the rows the sheet actually has - a report sheet with totals rows will differ by design.
- One date and one code column: the date should be a real date (not 45292) and the code should still have its leading zeros.
- One long text and one empty cell: the text should not be truncated, and the empty cell should be NULL or 0 as you decided.
Frequently Asked Questions
00123 stays 00123..xlsx, .xls, .xlsb and password-protected workbooks.Download Withdata FileToDB Now
Start importing Excel into SQL Server in seconds - free trial for all platforms.
$75 one-time · volume discounts to $55 · 30-day money-back · pricing & licence terms

