Message-ID: <1766779204.10111.1711713183116.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10110_259356881.1711713183116" ------=_Part_10110_259356881.1711713183116 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ExcelTemplate.BindColumnData(Object(), String, DataBindingProper= ties)

ExcelTemplate.BindColumnData(Object(), String, DataBindingPropertie= s)

Description

=20

Sets an array of objects as a data source for a single column in the tem= plate.

=20
C#
=20
 public virtual void BindColumnData(System.Object[] columnData, System.Stri=
ng dataSourceName, DataBindingProperties property)
=20
=20
vb.net
=20
Public Overridable Sub BindColumnData(ByVal columnData As Object(), ByVal d=
ataSourceName As String, ByVal [property] As DataBindingProperties)
=20
=20

Parameters

=20
columnData
An array of objects to use as the data sourc= e.=20
dataSourceName
The name of the template data marker= at which to insert the values imported from the data source.=20
property
The=20 DataBinding= Properties object which contains information about how the data should = be bound to the template.=20 property Must be specified, but the=20 DataBindingProperties need not be set beforehand. To bind data= to a template with the default=20 DataBindingProperties, pass in=20 ExcelTemplate.CreateDataBindingProperties() as the=20 property value. Otherwise, use the=20 ExcelTemplate.CreateDataBindingProperties() method to generate= a new=20 DataBindingProperties object and set the=20 Dat= aBindingProperties.MaxRows,=20 D= ataBindingProperties.Transpose, and/or=20 DataBindingProperties.WorksheetName properties for the workbook.=20

Exceptions

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

Remarks

You can set several data sources for a single temp= late. Use the following methods to set template data sources:=20 BindCe= llData,=20 Bind= ColumnData,=20 BindRow= Data, and=20 BindData.=20

Examples

=20
C#
=20

          //--- Set a column data source for the data marker
          //--- %%=3D$SimpleArray
          string[] onedim =3D {"SoftArtisans", "OfficeWriter=
", "ExcelTemplate"};
          xlt.BindColumnData(onedim,
               "SimpleArray",
               xlt.CreateDataBindingProperties());
        
=20
=20
vb.net
=20

          '--- Set a column data source for the data marker
          '--- %%=3D$SimpleArray
          Dim onedim As String() =3D {"SoftArtisans", "Offic=
eWriter", "ExcelTemplate"}
          xlt.BindColumnData(onedim, _
               "SimpleArray", _
               xlt.CreateDataBindingProperties())
        
=20
------=_Part_10110_259356881.1711713183116--