Can I enable a property to be set dynamically from variable using an SSIS Expression?

Can I enable a property to be set dynamically from variable using an SSIS Expression?

When using Data Flow Task Plus, sometimes you want to be able to set parameters in the source, transformation or destination components within the data flow, but those parameters are not available by default.

Let's take a look at an example.  In this Data Flow Task Plus, we want to be able to set the Excel Destination Plus property called FirstRowHasColumnName using a variable in an SSIS Expression. However, the only properties available to be set like this are StartRow, StartColumn and Worksheet.



In our package, the component named "Excel Destination Plus" only exposes the three default properties that can be set by an SSIS Expression. They are StartRow, StartColumn and Worksheet. In the component named "Excel Destinaton Plus 2", we have modified the .dtsx code behind it to expose the property called "[Excel Destination Plus 2].[FirstRowHasColumnName]" shown below.



You can see that, by modifying the code, the property for FirstRowHasColumnName is now exposed.

Here is how we did it.
1. Right click the .dtsx file and choose "View Code".
2. Change the code as follows and save the file.

From:
                <property
                  id="2516"
                  name="FirstRowHasColumnName"
                  dataType="System.Boolean"
                  description="Specifies first row contains column names.">true</property>

To:
                <property
                  id="2516"
                  name="FirstRowHasColumnName"
                  dataType="System.Boolean"
                  description="Specifies first row contains column names."
                  expressionType="Notify">true</property>

You may use this process for all of the properties associated with the COZYROC components that are inside your Data Flow.