Premium Excel Destination Component

The Premium Excel Destination Component is an SSIS data flow pipeline component that can be used to write data to an Excel File. There are three pages of configuration:

General

Columns

Error Handling

The General page is used to specify general settings for the Premium Excel Destination component. The Columns page is used to manage columns from the upstream component. The Error Handling page allows you to specify how errors should be handled when they occur.

General page

The General page allows you to specify general settings for the component.

Connection Manager

The Premium Excel Destination Component requires a connection. The Connection Manager drop-down will show a list of connection managers that are available. The supported connection managers are listed as below:

The Destination File Path specifies the location of the excel file that you are trying to write to. Click the eclipse button ('...') to open up a browser dialog to select an item.

Password to open

This option is used to specify the password to open the Excel file. If the excel file is not encrypted, you can leave this field blank.

Note: Password will be stored as plain text; if this information is critical, please save the file on local disk and use Excel Connection Manager.

Worksheet

Specify the Excel Worksheet you want to work with.

First row has column names

Select this option if you would like the first row to contain column names.

Set Password for Write Access

Select this option to set the “Password to modify” in Excel Files. When this option is used, it will automatically enable the "Read-only recommended" option for the Excel file after it is written.

Note: This option differs from the Excel Connection Manager's Password to Open option, it basically protects the file from writing while the Password to Open option in Excel Connection Manager protects it from opening and reading.

Write Mode Setting

There are four options available:

Clear and write new data: choose this option to clear the whole sheet and write rows.

Append at end: choose this option to append new rows at the end of existing rows.

Write to specified rows: choose this option to specify the rows to write

Start from row: enter the row number of start row

End at row: check this option to specify the end row number

Refresh Component Button

Clicking the Refresh Component Button will bring up a prompt for you to confirm the refresh. After clicking “Yes”, it will remove any existing columns and add all columns from the selected Excel worksheet.

Reset Columns Button

Clicking the Reset Columns button will bring up a prompt for you to confirm the reset. After clicking “Yes”, it will remove any existing columns and replace them with that of the Input Columns.

Map Unmapped Fields Button

By clicking this button, the component will try to map any unmapped attributes by matching their names with the input columns from upstream components.

Clear All Mappings Button

By clicking this button, the component will reset (clear) all your mappings in the destination component.

Expression fx Button

Clicking the fx button to launch SSIS Expression Editor to enable dynamic update of the property at run time.

Generate Documentation Button

Clicking the Generate Documentation button to generate a Word document which describes the component's metadata including relevant mapping, and so on.

Columns page

The Columns page of the Premium Excel Destination Component allows you map the columns from upstream components to the Premium Excel Fields.

In the Columns page, you would see a grid that contains four columns as shown below.

Input Column: You can select an input column from an upstream component for the corresponding Premium Excel Field.

Excel Field: The field that you are writing data to.

Data Type: This column indicates the type of value for the current field.

Unmap: This column can be used to unmap the field from the upstream input column, or otherwise it can be used to map the field to an upstream input column by matching its name if the field is not currently mapped.

Properties window for the field listed. The following values are configurable:

Name: Specify the Column name.

Data Type: The data type can be changed accordingly.

Format String: Specify the format codes to utilize the TEXT function that allows you to change the way a number appears. For more information on format codes visit TEXT function.

Length: If the data type specified is a string, the length specified here would be the maximum size. If the data type is not a string, the length will be ignored.

Precision: Specify the number of digits in a number.

Scale: Specify the number of digits to the right of the decimal point in a number.

CodePage: Specify the Code Page of the field.

+ sign: Add field to Excel File

- sign: Remove field from Excel File

Arrows: Move the field to a desired location in the file.

Error Handling page

The Error Handling page allows you to specify how errors should be handled when they happen.

There are three options available.

Fail on error

Redirect rows to error output

Ignore error

When the Redirect rows to error output option is selected, rows that failed to write to the Excel File will be redirected to the ‘Error Output’ output of the Destination Component. As indicated in the screenshot below, the blue output connection represent rows that were successfully written, and the red ‘Error Output’ connection represents rows that were erroneous. The ‘ErrorMessage’ output column found in the ‘Error Output’ may contain the error message that was reported by server or the component itself.