Excel to SQL Server: Import Workbooks without an Add-in

Read a workbook sheet by sheet and load it into SQL Server tables - one sheet, several sheets into one table, or every file in a folder, with the types decided per column.

Download FileToDB — free trial

Version 3.7.3 · Windows, Linux, macOS · 30-day free trial, then $75 one-time · runs fully offline

FileToDB: an .xlsx workbook opened as the source with the sheet list, header row and preview

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 1 screenshot

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.

Step 2 screenshot

Step 3: Map the columns and the types

Excel cells carry no type, so every column is decided here: text that must keep leading zeros stays text, a number becomes decimal or int, a date is read from its serial number.

Step 3 screenshot

Step 4: Run and check the counts

The task reports the rows written, and which sheets were skipped - a sheet with a different header order is reported rather than silently mixed in.

Step 4 screenshot

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, cron or launchd, 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 ExcelIn SQL ServerWhat to watch
textnvarchar(n)codes with leading zeros stay text, or 00123 arrives as 123
integer numbersint / bigintExcel holds everything as a double, so a 17-digit id is already approximate in the sheet
decimal numbersdecimal(p,s)Excel stores 0.1 as binary floating point - choose the scale deliberately
datesdate / datetime2a date in Excel is a serial number (45292 is 2024-01-01); the format displayed is not the value
TRUE / FALSEbita cell that is empty is not FALSE - decide NULL versus 0
formula resultsthe cached valuethe formula is not transferred, only what the file last calculated
error cells (#N/A, #DIV/0!)NULL or skippedan error cell is not text; it carries no value, so the mapping decides NULL or skip
merged cellsthe value in the first cellthe 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: 45292 with 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 searchedMeaningPage
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 automaticallyread the workbook, write the SQL Server tablethis page
excel to sql, excel to sql converter, convert excel to sql, excel to sql server insert query, excel to sql server insertproduce INSERT statements or a .sql file instead of loading a tableExcel to SQL
sql server excel add-in, sql server import wizard excelan add-in inside Excel, or the SSMS wizard - this tool needs neitherthis page (no add-in, no SSMS)
excel to sql server online, excel to sql server converter freethere is no upload step - the workbook is read from diskthis page (free trial)
excel to mysql, excel to postgres, excel to mariadb, excel to sqliteanother database as the targetMySQL / PostgreSQL / MariaDB / SQLite
csv to sql server, csv to mssqla delimited file as the sourceCSV 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

How do I import an Excel file into SQL Server?
Connect, open the workbook, pick the sheets, confirm the header row and the column types, then run the import into new tables or into tables that already exist.
Do I need Excel or an add-in installed?
No. The workbook is read as a file, so neither Excel nor an add-in is needed - and nothing has to run on the SQL Server machine.
Can I import several sheets into one table?
Yes - that is the usual monthly-report case: several sheets or several workbooks append into one table with the same header.
Why did my dates arrive as numbers?
Because Excel stores a date as a serial number with a display format. Set the column to a date type in the mapping and the serial is converted on the way in.
Why did the leading zeros disappear?
The column was read as numeric. Map it as text and 00123 stays 00123.
Can it update existing rows instead of appending?
Yes - name the key column and choose update or upsert: matching rows are refreshed, new keys are inserted.
Which Excel formats are supported?
.xlsx, .xls, .xlsb and password-protected workbooks.
Can it run on a schedule?
Yes - save the task and run it from Task Scheduler, cron or launchd, pointing at a folder that gets a new workbook each period.

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

Download Free Trial