Sunday, December 22, 2013

How to Export Sql Server Table Data into Excel

Leave a Comment
To export data from Sql Table into Excel sheet can be achieved by using Export Data property of Sql Server Management Studio. In previous article explained about How to Import Excel into Sql Server Table.

Steps to Export Data from Sql Table to Excel sheet:

Before exporting data to excel sheet create the excel sheet with the same column name as that of sql server table in the first row of excel sheet.
Step 1: Right click on database name whose table you want to export then select the option Tasks->Export Data as shown in the figure below:

Export Data into Excel Sheet in sql server 2008


Step 2: Sql Server Import and Export wizard will open click on the Next Button. Choose Data Source window will open here select the type of authentication  and name of Sql database which you want to export and then click on Next button as shown below:
Export Data into Excel Sheet in sql server 2008

Step 3: In the Choose Destination Window select Microsoft Excel in Destination, in Excel connection String choose the excel sheet in which data to be exported. Select version of Excel file and the select the Next option as shown in picture below:
Export Data into Excel Sheet in sql server 2008

Step 4: In the next window select the check box Copy data from one or more tables or views and then click on next button as shown below:
Export Data into Excel Sheet in sql server 2008

Step 5: In Select Source Tables and Views window in Source section select the name of table which to be exported and in Destination side select the worksheet of excel file which contain the name of columns of table to be exported as shown below:
Export Data into Excel Sheet in sql server 2008

Step 6: Review Data Type Mapping window will open as shown in picture below. There is no need to alter any option in this window just select the Next Option here as shown in the diagram  below:

Export Data into Excel Sheet in sql server 2008

Step 7: In Save and Run Package window select the next option as shown in the picture below:
Export Data into Excel Sheet in sql server 2008

Step 8: The complete Wizard window will open click on Finish option here as shown in the picture below:

Export Data into Excel Sheet in sql server 2008

Finally the export data window will open as and export data process will start . Success message would be displayed if everything is configured according to steps mentioned above. The final execution window would be like shown in diagram will:
Export Data into Excel Sheet in sql server 2008

0 comments:

Post a Comment