Saturday, 16 July 2016

How to import data from Excel Using SSMS ?

Following are the steps to import data from Excel to SQL server.

 Right Click the database --> Select Tasks --> Import Data as shown below.


  
 Click Next button.



Choose the data-source as Microsoft Excel and select the excel path which you want to import.
If the first row has column names then select the option as shown below.



Choose the destination source as SQL server native client and choose the authentication based on your configuration.


If you want to copy entire columns and its data you can choose the first option.
You can choose the second option if you want to transfer the data based on query.


You can choose the sheet from the excel source and give the destination table name in the destination as shown below.

You can also change the destination table data type by choosing the edit mapping option.

Once done click next option.


Click finish button to import the data.



As you can see the data has been imported successfully and you can see the no of rows transferred in the below image.




 After importing the data you can check the destination table name by running the following query as shown below.


The excel data has been imported successfully.

No comments:

Post a Comment