Sunday, April 7, 2019

SQL Server : Export data to excel using export data wizard


In this article I am going to explain how to export data to excel file using SQL Server export data wizard.


There are many ways to export data to excel from SQL server. Here I am going to explain how you can export the data to excel file using export data wizard. This feature is available in SSMS (SQL Server management Studio).


Open SQL Server management Studio and connect to server. Right on database from which you want to export the data. Here I have select Northwind database. Right click on it, go to Task and select Export data.

Export data to excel using export data wizard


SQL Server import and export wizard window will be open. Click on next button.

Export data to excel using export data wizard


Choose data source window

Export data to excel using export data wizard

This will be opened with already filled values. You will saw the following options:
Data source : Choose SQL server native client 10.0 from dropdown.
Server name : Type the SQL server instance name from which want to get data.
Authentication : Authentication mode of data source connection.
Database : Choose database from which want to get data.

Click on next button to go next step.


Choose a destination

Export data to excel using export data wizard

From this window you have specify where to copy data to. You will saw the following options:
Destination : Select the Microsoft Excel from dropdown options.
Excel file path : Specify the Excel worksheet path.
Excel version : Select the Excel version from dropdown.

Now click on next button to procced.


Specify table copy or query

Export data to excel using export data wizard

You will saw 2 options. Proceed with the default one and click on next button.


Select source Tables and Views

Export data to excel using export data wizard

Here you will see list on tables and view. Select the table/view of which want to copy the data. I have select the customers table. You can see the preview of data. Click on next button to go next step.

Export data to excel using export data wizard


Review data type mapping

Export data to excel using export data wizard

In this window you will see how data types are mapped to source and destination. Click on next button.


Save and run package

Export data to excel using export data wizard

Run immediately checkbox is by default checked. Click on next button.


Complete the wizard

Export data to excel using export data wizard

In this window you can see the all the options choose by you. Click on finish button to run.

The last window of this wizard will show you the result, weather data is successfully exported or any error comes during exporting the data.

Export data to excel using export data wizard


No comments:

Post a Comment