Sets a column's data source to an collection. The IEnumerable interface supports a simple iteration over a collection.

 public virtual void BindColumnData(System.Collections.IEnumerable dataSource, System.String dataSourceName, DataBindingProperties property)
Public Overridable Sub BindColumnData(ByVal dataSource As System.Collections.IEnumerable, ByVal dataSourceName As String, ByVal [property] As DataBindingProperties)

An IEnumerable collection to use as the data source.

The name of the template data marker at which to insert the values imported from the data source.

The DataBindingProperties object which contains information about how the data should be bound to the template. property Must be specified, but the DataBindingProperties need not be set beforehand. To bind data to a template with the default DataBindingProperties, pass in ExcelTemplate.CreateDataBindingProperties() as the property value. Otherwise, use the ExcelTemplate.CreateDataBindingProperties() method to generate a new DataBindingProperties object and set the DataBindingProperties.MaxRows, DataBindingProperties.Transpose, and/or DataBindingProperties.WorksheetName properties for the workbook.

BindColumnData will throw this exception if null (C#) or Nothing (VB.NET) is passed to the method.

You can set several data sources for a single template. Use the following methods to set template data sources: BindCellData, BindColumnData, BindRowData, and BindData.


          //--- Set a column data source for the data marker
          //--- %%=$Products
          xlt.BindColumnData(coll,
               "Products",
               xlt.CreateDataBindingProperties());
        

          '--- Set a column data source for the data marker
          '--- %%=$Products
          xlt.BindColumnData(coll, _
               "Products", _
               xlt.CreateDataBindingProperties())