Excel Source

SQL Server 2005, 2008, 2008R2, 2012, 2014

SQL Server 2005, 2008, 2008R2, 2012, 2014

All Downloads ----- Join VIP ----- Questions?

Overview

The Excel Source Component is an SSIS Data Flow Component for consuming data from Excel worksheets.

The component dialog contains the following elements:

  • General tab - specify the source Excel worksheet and region.
  • Columns tab - select the columns to load.
  • Error Output tab - specify error handling options.


Demonstration

Setup

Use the parameters below to set up the component.

General

Connection

Select the COZYROC Excel connection manager. Note: This will not work if you select the standard Excel connection manager.

Related Topics: Excel Connection Manager

Worksheet

Select Excel worksheet as the source.

First row has column names

Indicate that the first row contains column names.

Named Range (1.5 SR-2)

Specify a named range within the source Excel file.

Region Column

Specify which columns from the source are to be used as the input region.

  • Start - start column. The column numbering is 1-based.
  • Width - number of columns.
Region Row

Specify which rows from the source are to be used as the input region.

  • Start - start row. The row numbering is 1-based.
  • Height - number of rows. If set to -1, the component will read all used rows from the worksheet.
Output

Specify the output type. This parameter has the options listed in the following table.

Value Description
Formatted Value Output formatted cell value.
Raw Value Output raw cell value.
Formula Output cell formula.
Reset

Click the Reset button to re-initialize the component metadata.

Columns

Use the Columns tab to specify which columns are to be processed from the source Excel file and to specify new names for the columns being processed, if desired.

Available External Columns

This table lists the columns, by name, that are available to be processed from the source Excel file. If there are columns that you do not want to process, uncheck them from the list.

Note:You cannot use this table to add or delete columns in the source Excel file. To manipulate data in an external Excel file, use the COZYROC Excel Task.

External Column

Shows the columns that will be processed from the source Excel file based on the columns selected in the Available Input Columns list.

Output Column

This shows the column name that will be used during processing. The name of any column may be changed by typing over the text in this list. Each name must be unique.

Error Output

Use the Error Output page to select error handling options for the columns.

Input or Output

View the name of the data source.

Column

View the selected source column.

Error

Specify what should happen when an error occurs: ignore the failure, redirect the row, or fail the component.

Related Topics: Handling Errors in Data

Truncation

Specify what should happen when a truncation occurs: ignore the failure, redirect the row, or fail the component.

Description

View a description of the error.

How to modify source dynamically at runtime

The source worksheet and region are available in the data flow properties list. Follow these steps to set up an expression:

  • Right-click on the data flow canvas and select the Properties menu.
  • Scroll down and find the property named like [Excel Source Plus].[Worksheet]. This is the property containing the worksheet.
  • Scroll down and find the property named like [Excel Source Plus].[Region]. This is the property containing the source region. The property is a string combination containing values for start column, start row, width and height. Each value is separated with a comma (,).
  • Scroll down and find the Expressions property. Set up an expression to modify the worksheet or region dynamically.

Samples

  • Excel data sources: no longer the scourge of SSIS Developers by Daniel Perianez.