Site icon Database Tutorials

How To Import Excel To SQL Server Table

 

In the article “How to Transfer a Table From SQL Server To Excel“, I explained how to export our table from SQL Server to Excel. In this article, I will describe how to export Excel into a SQL Server database.

In the previous example, we transferred the Person.Adress table from the AdventureWorks2014 database to Excel. Now we will import this excel into our Test database.

Right-click on the test database and click on Task-> Import.

We are filling the required fields as in the screenshot below. In Excel file path, we select the excel file that we will import by clicking Browse.

 

Click Next to proceed. We select Microsoft OLE DB Provider for SQL Server from the screen as follows. It is automatically selected because we selected ServerName and Database.

 

On the next screen, we proceed by clicking next without making any changes as follows.

 

On the next screen, we proceed by selecting the Adress option without the $ sign as below.

 

The sql server also makes the type settings on the next screen. We can choose the type we want. But we need to pay attention to the type mismatch.

 

Click Next and Next. We have transferred the Excel table to the test database as a table named “[dbo]. [Address]”.

Exit mobile version