Wednesday, December 18, 2013

How to Import Excel Data into Sql Server Table

Leave a Comment
This tutorial is about importing data from excel to Sql Server table in SQL Server 2008. To import data into Sql Server table Excel sheet should contain the same field name as that of Sql Server table.
To export data from sql table to Excel follow this post:
Export Data from Sql to Excel Sheet

Steps to Import Excel Data into Sql Server Table:

Step 1: Right click on Database Name which contain the table in which the excel data to be imported then select the option Tasks->Import Data as shown in diagram below:

Import excel into sql server 2008

Step 2: Sql Server Import and Export wizard will open click on Next Button in this window:

Import excel into sql server 2008

Step 3: In the Data Source Window select Data Source: Microsoft Excel . Then Browse the Excel File from which data to be imported. Select the Version of the Excel file. Then click on Next Button as shown in picture below:

Import excel into sql server 2008

Step 4: In Choose Destination Window select Destination Sql Server Native Client 10.0. Then Select Server Name . Select type of Authentication you use while connecting to Sql Server Management Studio.

In the Database field select Database Name which contain the table in which data to be imported as shown in the picture below and click on Next Button:


Step 5: In the Next window select the option 'Copy Data From one or more tables or views' as shown in the diagram given below:

Import excel into sql server 2008

Step 6: In Select Source Tables and Views window in Source select the excel worksheet which contain the data and in Destination side select the table in which data to be imported as shown below:

Import excel into sql server 2008

Step 7: In Review Data Type Mapping window just ignore the warnings and click on Next button as shown in the picture below:

Import excel into sql server 2008

Step 8: In the Save and Run Package window click on Next button as shown in diagram below:

Import excel into sql server 2008

Step 9: The complete Wizard window will open click on Finish Button the data import process will start and display success message if configured properly as shown in the picture below:


Feel free to ask any question if you find and problem while importing data using steps mentioned in this tutorial.

0 comments:

Post a Comment