---
title: Importing data from Excel to SQL database table directly
description: "There are many different ways to import data from Excel to SQL database table directly, like writing a script, macro etc. But, there is a simple solution where you could just import data from excel file to SQL database just like a copy paste would work. \nThis articles explains the steps for importing data from Excel to SQL database table directly."
image: https://blog.e-zest.com/hubfs/Healthcare%20Microsite/Website%20Banners/What%20we%20do.png
---

[![e-Zest logo\_An accion lab company\_Colour](https://blog.e-zest.com/hubfs/images/Logos%20with%20Tagline/Corporate/SVG/e-Zest%20logo_An%20accion%20lab%20company_Colour.svg "e-Zest logo_An accion lab company_Colour")](https://www.e-zest.com/)

- [WORK](https://www.e-zest.com/our-work)
- [SERVICES](https://www.e-zest.com/our-services) 
    - [Product Engineering](https://www.e-zest.com/digital-product-engineering-services)
    - [Enterprise Data Services](https://www.e-zest.com/enterprise-data-services)
    - [Digital Commerce](https://www.e-zest.com/digital-commerce-services)
    - [Digital Operations](https://www.e-zest.com/digital-operations)
    - [Digital Consulting](https://www.e-zest.com/digital-transformation-consulting-services)
    - [Digital Experience Design](https://www.e-zest.com/digital-experience-design)
- [INSIGHTS](https://blog.e-zest.com/)
- [CAREERS](https://www.e-zest.com/careers)
- [ENTERPRISE DATA SERVICES](https://www.e-zest.com/enterprise-data-services)
- [GENERATIVE AI](https://www.e-zest.com/generative-ai)
- [Healthcare](https://healthcare.e-zest.com)
- [Contact Us](https://www.e-zest.com/contact-us)

- ![Elevating Product Engineering with AI and ML](https://blog.e-zest.com/hubfs/Elevating%20Product%20Engineering%20with%20AI%20and%20ML.jpg)

  [BLOGS](https://blog.e-zest.com)
  
  #### Elevating Product Engineering with AI and ML

  As technology evolves and customer choices broaden, there is an increasing ...

  [Read more](https://blog.e-zest.com/elevating-product-engineering-with-ai-and-ml)
- ![e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024](https://blog.e-zest.com/hubfs/e-Zest%20%E2%80%93%20An%20Accion%20Labs%20Company%20-%20Gets%20Recognition%20as%20a%20Contender%20in%20the%20ISG%20Provider%20LensTM%20Study%20on%20Digital%20Engineering%20Services%202024.jpg)

  [NEWS](https://blog.e-zest.com/news)
  
  #### e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024

  We are delighted to announce that e-Zest – An Accion Labs Company has been ...

  [Read more](https://blog.e-zest.com/news/e-zest-an-accion-labs-company-gets-recognition-as-a-contender-in-the-isg-provider-lens-study-on-digital-engineering-services-2024)
- ![e-Zest Solutions supports Digital Pune Mission](https://blog.e-zest.com/hubfs/blog-files/Digital%20Literacy%20Bus%20e-Zest.png)

  [CSR](https://blog.e-zest.com/csr)
  
  #### e-Zest Solutions supports Digital Pune Mission

  **Pune, India:** e-Zest Solutions, a leading digital technology innovation ...

  [Read more](https://blog.e-zest.com/csr/e-zest-solutions-supports-digital-pune-mission)

- [Work](https://www.e-zest.com/our-work)
- [Services](https://www.e-zest.com/our-services)
- [Insights](https://blog.e-zest.com)
- [Careers](https://www.e-zest.com/careers)
- [Enterprise Data](https://www.e-zest.com/enterprise-data-services)
- [Generative AI](https://www.e-zest.com/generative-ai)
- [Innovations](https://www.e-zest.com/innovations)
- [Healthcare](https://healthcare.e-zest.com)
- [About](https://www.e-zest.com/about-us)
- [Contact](https://www.e-zest.com/contact-us)

- [Blog](https://blog.e-zest.com/)
- [News](https://blog.e-zest.com/news)
- [CSR](https://blog.e-zest.com/csr)

- [![Linkedin Icon](https://blog.e-zest.com/hubfs/icons/linkedin_icon_white.svg)](https://www.linkedin.com/company/e-zest-solutions/)
- [![Twitter Icon](https://blog.e-zest.com/hubfs/twitter-logo-silhouette%20(5).svg)](https://twitter.com/ezest)
- [![Facebook Icon](https://blog.e-zest.com/hubfs/facebook-app-logo%20(4).svg)](https://www.facebook.com/61259256638)
- [![Instagram Icon](https://blog.e-zest.com/hubfs/instagram-logo%20(4).svg)](https://www.instagram.com/ezestsolutions/)
- [![Youtube Icon](https://blog.e-zest.com/hubfs/icons/youtube_icon_white.svg)](https://www.youtube.com/user/ezestcorporate)

[![Go to top icon](https://blog.e-zest.com/hubfs/AA%20Assets/top%20button.svg)](https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly#top)

Hit enter to search or ESC to close

Insights

e-Zest members share technology ideas to foster digital transformation.

- [Blog](https://blog.e-zest.com)
- [Whitepaper](https://blog.e-zest.com/whitepaper)
- [Playbook](https://blog.e-zest.com/playbook)
- [News](https://blog.e-zest.com/news)
- [CSR](https://blog.e-zest.com/csr)
- [Innovation](https://blog.e-zest.com/innovation)
- [Healthcare](https://blog.e-zest.com/healthcare)
- [Media Kit](https://www.e-zest.com/media-kit)

# Importing data from Excel to SQL database table directly

[Md Shahzad Adil](https://blog.e-zest.com/author/md-shahzad-adil)  Nov 21, 2016

[SQL database](https://blog.e-zest.com/topic/sql-database) [database](https://blog.e-zest.com/topic/database) [SQL database table](https://blog.e-zest.com/topic/sql-database-table) [excel](https://blog.e-zest.com/topic/excel)

- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly&title=&summary=&source=>
- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly&text=Importing%20data%20from%20Excel%20to%20SQL%20database%20table%20directly>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly>
- <https://www.instagram.com/ezestsolutions/?u=https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly>

There are many instances where you might be developing an application, but you want some seed data or business data to be populated into a table in SQL Server. Considering such a scenario, where source data resides in an excel file and you just want to import data from the excel file to your SQL database table. There are many different ways to do it, like writing a script, macro etc. But, there is a simple solution where you could just import data from excel file to SQL database just like a copy paste would work. Let’s get it done step by step. 

**Have a source data ready** 

We have here a sample source data in an excel file. It is just a simple 2 column data. As you can see the excel file has 2 worksheets; **Sheet1** and **Sheet2**. Our data here resides in **Sheet2**.  

![Shahzad.png](https://blog.e-zest.com/hs-fs/hubfs/Shahzad.png?width=322&height=368&name=Shahzad.png)**Have a target database in SQL Server** 

In the SQL Server, you need to create a database where data would be imported. You can create a table beforehand or on the fly as your data gets imported.  

**Launch import data wizard** 

Right click on the target database and the select **Tasks -\> Import Data**. This will bring up the step by step wizard for data import. You might get a start page with some introductions. Just get past it by clicking on **Next**. 

![Shahzad-1.png](https://blog.e-zest.com/hs-fs/hubfs/Shahzad-1.png?width=499&height=316&name=Shahzad-1.png)**Choose a data source** 

Choose a source from where you want to import the data. In the list of **Data Source**, Select **Microsoft Excel**. Then, browse the excel file having the data for import. You should also be able to select appropriate Excel version. There is an important option called **First Row has column names**. Check this if the data in the excel file has its first row as column names. As in this example, the first row is the name of columns, i.e. **Id** and **Name**. If there is no column name and the file just contains data, uncheck this option. Some column names would be generated automatically which you could easily rename. Click **Next** to proceed. 

![Shahzad.PNG.jpg](https://blog.e-zest.com/hs-fs/hubfs/Shahzad.PNG.jpg?width=542&height=563&name=Shahzad.PNG.jpg)

**Choose destination for data import** 

Choose a destination for data to be imported into. The destination should already be set to **SQL Server Native Client 10.0** depending in which version of SQL server is installed. Provide appropriate Server name for name SQL Server is running. Or you can also open up dropdown and select from there. Specify type of authentication used. Select target database name from database dropdown. Click **Next** to proceed. 

In next step keep **Copy data from one or more tables…** selected and proceed to next step. 

**Map Source and destination tables** 

The next screen would let you map the source and destination data sources. The source column would show all the worksheets in excel file. Check the worksheet which has data. In this case it is **Sheet2**. At this point the destination is auto populated with something like **\[dbo\].\[Sheet1$\]**. Here **Sheet1$** is the name of target table. So change the name to table name you want. 

You can also view and change mappings using **Edit Mappings** option. It opens up a new window with a few options. Creating destination table would automatically create table in the database. Then you can choose to drop and recreate tables if you want. The mappings section lists mapping between the source columns and destination columns. You can change the type, size and null constraint. Or you could also correct the mapping if they are not mapped correctly. 

Alternatively, you could also view and edit the SQL query using **Edit SQL** option. Click Ok when done and proceed to next step.

![Shahzad-3.png](https://blog.e-zest.com/hs-fs/hubfs/Shahzad-3.png?width=576&name=Shahzad-3.png)

**Complete the import process** 

The next step will allow you to run import process immediately or save it as an SSIS package for later uses. At this point you can choose to run it now and click on either **Next** or **Finish**. Clicking next will take to a summary of the operation that will be performed. Review it and click **Finish**. Voila!!! Your data must have been imported successfully into the new table. 

- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly&text=Importing%20data%20from%20Excel%20to%20SQL%20database%20table%20directly>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly>
- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/importing-data-from-excel-to-sql-database-table-directly&title=&summary=&source=>

### Similar Blog

[![Why TDD is a must from a Return on Investment (ROI) point of view](https://blog.e-zest.com/hubfs/blog-files/TDD.jpg) Why TDD is a must from a Return on Investment (ROI) point of view There has been a lot of discussion going around Test-Driven Development (TDD) lately and almost everyone is trying to jump on the ... By Md Shahzad Adil May 14, 2020](https://blog.e-zest.com/why-tdd-is-a-must-from-a-return-on-investment-roi-point-of-view)

[![ASP.NET Core App using EF Core and SQLite database](https://blog.e-zest.com/hubfs/Basics%20of%20Stored%20Procedure%20in%20SQL%20Server%20Management%20Studio-191118.png) ASP.NET Core App using EF Core and SQLite database **INTRODUCTION**The tutorial covers a basic example of how to build a simple API in ASP.NET Core using Entity Framework Core and ... By Md Shahzad Adil Jun 19, 2018](https://blog.e-zest.com/asp.net-core-app-using-ef-core-and-sqlite-database)

[![Pass command line arguments from InstallShield/MSI installer to custom action EXE](https://blog.e-zest.com/hubfs/11.png) Pass command line arguments from InstallShield/MSI installer to custom action EXE With Visual Studio a lot of things have changed especially after they have dropped the support for setup projects and instead ... By Md Shahzad Adil May 10, 2016](https://blog.e-zest.com/pass-command-line-arguments-from-installshield-or-msi-installer-to-custom-action-exe)

## Helping Organizations Thrive in the Digital Age

[Contact Us](https://www.e-zest.com/contact-us)

- [About](https://www.e-zest.com/about-us)
- [Services](https://www.e-zest.com/our-services)
- [Work](https://www.e-zest.com/our-work)
- [Insights](https://blog.e-zest.com/)
- [Healthcare](https://healthcare.e-zest.com/)
- [Accion Labs](https://www.accionlabs.com/)

- <https://www.linkedin.com/company/e-zest-solutions/>
- <https://twitter.com/ezest>
- <https://www.facebook.com/eZest/>
- <https://www.instagram.com/ezestsolutions/>
- <https://www.youtube.com/user/ezestcorporate>

- Dallas
- Detroit
- Hannover
- Vienna
- London
- Pune

 © 2025 e-Zest Solutions

- [Privacy Policy](https://www.e-zest.com/privacypolicy)
- [Cookie Policy](https://www.e-zest.com/cookie-policy)

 Contact us

 Contact us

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.