Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs

Export Data from SQL Server To Excel Using SSIS Import And Export Wizard

by suresh

In SQL Server, We have SSIS Import and Export Wizard, which can help to export data from SQL Server to Excel destination using Wizard. In this SSIS example, we are going to export [Sales 2] table data from the Sql Server Database [SSIS Tutorials] to Excel file present in the local hard drive using SQL Import And Export Data Wizard.

Below screenshot shows you the data present in the [Sales 2] Table

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 0

Export Data from SQL Server To Excel Using SSIS Import And Export Wizard

To Export Data from SQL Server To Excel Using SSIS Import And Export Wizard, Double click on SQL Server Import and Export Wizard tool. You can find in start -> All Programs -> Microsoft SQL Server 2014 -> SQL 2014 Import and Export Data Wizard. It will open the SQL Server Import and Export Data Wizard. The first page is the welcome page

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 1

Choose a Data Source Page: This page is used to set the source information. Our source is the SQL database. So we are choosing the SQL Server Native Client as our source and our instance as a server name.

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 2

Select the source database from the list. Let us pick the [SSIS Tutorials] here.

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 3

Authentication: Here, we are using windows authentication, but in real-time, your organization provides the credentials to access the database. In that case, swap the radio button to SQL authentication and produce the user name and password.

Choose a Destination: This page to set the target information. Our SSIS job is to save the SQL Server data into an Excel file. So we are selecting Microsoft Excel as our Destination

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 4

Then we have to select the existing Excel file from our local drive

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 5

From the above screenshot, you can observe that we are choosing the Export Data from SQL Server to Excel file. Click the Open button to select it

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 6

If your Excel file includes the column names in the first row, checkmark the checkbox “Column name in the first data row”. If not, uncheck it.

Click Next button

Specify Table Copy or Query: Here we have two options

  • Copy data from one or more tables or views: Use this option to select from existing tables or view (All the columns data)
  • Write a query to specify file data to transfer options: This is the option we usually use because there will be unnecessary columns in every table. So it is better to bypass them or selecting data with the condition.
Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 7

For the time being, we are selecting every row, so we chose the first option. Click Next button

This page is to select the source table from the SQL database. Here we are choosing [Sales 2] table. If your Excel file already contains the table to hold the output. Then select the appropriate Excel table from the destination list. Otherwise, SQL Server Import and Export Wizard will generate the table name. Click on the preview button to check the incoming data flow

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 8

Click on the Edit mappings button to change the Data types and size of each column. You can also edit the table creation using the Edit SQL button

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 9

From the above screenshot, see that the English Product Name, Color, and Sales Order Number columns are of type LongText, which is not compatible with the source data in SQL Server. So, let us change the data types.

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 10

We changed the columns mentioned above to VarChar and assigned the required sizes as well. If you forgot to change the size of a column, data would truncate. So please change the size of each column to match with source columns.

Save and Run Package: This page gives us the option to save the package in either SQL server or File system. For now, we are not saving the package

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 11

Click finish button to complete the Wizard

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 12

From the above, see the status: Success and Message.

Let’s navigate to the file system address we provide and check for the file name Export Data from SQL Server to Excel. Double click on Excel file to check the result

Export Data from Sql Server To Excel Using SSIS Import And Export Data Wizard 13

Placed Under: SSIS

  • What is SSIS
  • Install SQL Server Data Tools
  • Learn SSIS in 28 Days
  • Create a SSIS Project
  • Create SSIS Package
  • SSIS Connection Manager
  • OLE DB Connection Manager
  • SSIS ADO Connection Manager
  • ADO.NET Connection Manager
  • SSIS Cache Connection Manager
  • SSIS Excel Connection Manager
  • SSIS File Connection Manager
  • SSIS FTP Connection Manager
  • SSIS SMO Connection Manager
  • Source Assistance in SSIS
  • Flat File Source in SSIS
  • OLE DB Source in SSIS
  • Excel Source in SSIS
  • ADO.NET Source in SSIS
  • SSIS FLAT FILE Destination
  • SSIS OLE DB Destination
  • SSIS ADO.NET Destination
  • SSIS Transformations
  • SSIS Audit Transformation
  • SSIS Aggregate Transformation
  • SSIS Aggregate Advanced Mode
  • SSIS Cache Transformation
  • SSIS Character Map
  • SSIS Conditional Split
  • SSIS Copy Column
  • SSIS Data Conversion
  • SSIS Derived Column
  • SSIS Export Column
  • SSIS Fuzzy Grouping
  • SSIS Fuzzy Lookup
  • SSIS Import Column
  • SSIS Lookup Introduction
  • Lookup – OLE DB Connection
  • SSIS Lookup in Full Cache Mode
  • SSIS Lookup – Case Sensitivity
  • SSIS Merge Transformation
  • SSIS Merge Join Transformation
  • SSIS Merge Join – Left Outer Join
  • SSIS Merge – Right Outer Join
  • SSIS Merge Join – Full Outer Join
  • SSIS Multicast Transformation
  • SSIS OLEDB Command
  • OLEDB Command – Delete Data
  • OLEDB Command-Update Data
  • SSIS Percentage Sampling
  • SSIS Pivot Transformation 2008
  • SSIS Pivot Transformation
  • SSIS Row Count Transformation
  • SSIS Row Sampling
  • Script Component as Source
  • Script Component as Destination
  • SSIS Script as Transformation
  • SSIS Sort Transformation
  • SSIS SCD Type 0
  • SSIS SCD Type 1
  • SSIS SCD Type 2
  • SSIS Term Lookup
  • SSIS Term Extraction Intro
  • Term Extraction – Extract Nouns
  • SSIS Extract Noun Phrases
  • Extract Nouns & Noun Phrases
  • Term Extraction – Exclusion Tab
  • SSIS Unpivot Transformation
  • SSIS Union All Transformation
  • SSIS For Loop Container
  • SSIS ForEach File Enumerator
  • SSIS ForEach SMO Enumerator
  • SSIS ForEach Variable
  • SSIS Foreach NodeList
  • Foreach ADO.NET Schema Rowset Enumerator
  • SSIS Bulk Insert Task
  • SSIS Data Profiling Task
  • Execute T-SQL Statement Task
  • SSIS Execute SQL Task Intro
  • SSIS Execute SQL Task Example
  • Execute SQL Task- Single Rowset
  • Execute SQL Task – Full Row Set
  • SSIS Execute Package Task
  • Execute Packages in SQL Server
  • Execute Packages in File System
  • SSIS Execute Package Project Reference
  • SSIS File System Task
  • SSIS File System Task- Copy Files
  • File System Task-Copy Directory
  • File System Task – Delete Files
  • File System Task – Delete Folder
  • File System Task -Move Directory
  • SSIS File System Task -Move File
  • File System – Move Multiple files
  • File System Task – Rename File
  • File System Task – Set Attributes
  • SSIS FTP TASK
  • SSIS Create Local Directory
  • SSIS Create Remote Directory
  • SSIS FTP Task Send Files
  • SSIS FTP – Send Multiple Files
  • SSIS FTP Task Delete Local Files
  • FTP TASK Delete Local Directory
  • FTP Task Delete Remote files
  • SSIS Delete Remote Directory
  • SSIS FTP Task Receive Files
  • SSIS FTP Receive Multiple Files
  • SSIS Script Task
  • Transfer SQL Server Objects Task
  • Transfer SQL Table Structures
  • Transfer SQL Tables with Data
  • Transfer SQL Stored Procedures
  • Transfer User Defined Functions
  • Transfer SQL Views in SSIS
  • SSIS Web Service Task
  • SSIS XML Task-Validate XML File
  • Transform XML File using XSLT
  • XML Task-XML files Differences
  • Create SSIS Catalog
  • Package Deployment using BIDS
  • Deploy Package Using SQL
  • Deploy using SQL Server Wizard
  • SSIS Breakpoints
  • SSIS Checkpoints
  • SSIS Error Handling
  • SSIS Event Handlers
  • SSIS Transactions
  • SSIS Logging
  • SSIS Parameters
  • SSIS Package Configuration
  • Configure using SQL Server
  • Config using Registry Entry
  • Conf with Environment Variable
  • SSIS XML Configuration File
  • XML Configuration File Part 2
  • SSIS Package Protection Level
  • SSIS Incremental Load
  • Incremental Load Example 2
  • SSIS Remove Double Quotes

Copyright © 2021 · All Rights Reserved by Suresh

About Us | Contact Us | Privacy Policy