The EXCEL Source in SSIS (SQL Server Integration Services) is used to extract data from the Excel worksheet. The SSIS Excel Source uses Excel Connection Manager to connect with the Excel files.
Configuring EXCEL Source in SSIS
Drag and drop the data flow task from the toolbox to the control flow. Next, change the name to Configuring EXCEL Source in SSIS.
Double-click on it will open the data flow tab. Now, Drag and drop Excel Source from the SSIS toolbox into the data flow region. For more information on data Loading >> Click Here.
Double click on Excel source in the data flow region will open the connection manager settings. If you haven’t created an Excel Connection Manager before, click on the New button and configure it.
In this example, we are selecting the already created Excel Connection Manager. Please refer EXCEL Connection Manager article to understand How to configure the Excel Connection Manager.
Data Access Mode: This property provides four options for us:
- Table Or View: If you select this option, It will display the list of available Tables present in the Excel Worksheet. And our job is to select the required tables from them.
- Table name Or View name variable: If you select this option, We have to provide the variable name that holds the Table name or View name.
- SQL Command: If you select this option, We have to write the SQL Command on our own.
- SQL Command from the variable: If you select this option, We have to provide the variable name that holds the SQL Command.
If you select the SQL Command option, then Editor will display the following options.
- SQL Command Text: If you are familiar with SQL Queries, you can write it in the empty space provided by this option.
- Build Query: If you click on this option, it will open a Query Designer to design the required query using the Graphical User interface. Please refer to the Query Builder article.
- Browse: This will allow us to select the Query present in the file system.
- Parse Query: This option will check whether the query was successfully parsed or not
For the time being, we are selecting the Table or View option here. If you choose this option, the Name of the table or the View option displays all the available Tables and Views present in the current connection manager.
From the above screenshot, you can observe that we selected the PRODUCTS table from the Excel Worksheet. Click on the preview button to see the data present in the table.
Click on the columns tab to verify the columns. We can also remove the unwanted columns by unchecking them.
Click ok to finish configuring EXCEL Source in SSIS.
To show the data inside the Excel Source, we are just adding the Union All and then enabling the Data Viewer.
Please execute the SSIS package to see the data inside the configured Excel Source