Message-ID: <2019287281.8271.1711639582924.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8270_794741482.1711639582924" ------=_Part_8270_794741482.1711639582924 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Sets an array of objects as a data source for a single row in a template= .? When binding an array horizontally, you must insert a datamar= ker for each element you want displayed.
=20public virtual void BindRowData(System.Object[] rowData, System.String[] c= olumnNames, System.String dataSourceName, DataBindingProperties property)=20
Public Overridable Sub BindRowData(ByVal rowData As Object(), ByVal columnN= ames As String(), ByVal dataSourceName As String, ByVal [property] As DataB= indingProperties)=20
columnNames
parameter is null, field binding can only be perfo=
rmed by ordinal (for example, %%=3DDSN.#1 or %%=3D$DSN). If=20
columnNames
is specified, both ordinal field binding and named=
field binding can be used.=20
dataSourceName
must be specified, but can be left as null or a=
n empty string if this is the first data source bound AND the data markers =
in the template use the=20
short da=
ta marker syntax or refer to the datasource by number rather than name.=
Note:=20
dataSourceName
does not include a data marker's column name, f=
or example, the=20
dataSourceName
for=20
%%=3DProducts.ProductID
is "Products."=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
Da=
taBindingProperties.MaxRows,=20
=
DataBindingProperties.Transpose, and/or=20
DataBindingProperties.WorksheetName properties for the workbook.=20
BindRowData
will throw this exception if=20
null
(C#) or=20
Nothing
(VB.NET) is passed to the method.=20
//--- Set a data source for the row of data markers //--- %%=3DAddress.Street, %%=3DAddress.City, and //--- %%=3DAddress.State string[] addressvalues =3D {"1330 Beacon St.", "Br= ookline", "MA"}; string[] addressnames =3D {"Street", "City", = "State"}; xlt.BindRowData(addressvalues, addressnames, "Address", xlt.CreateDataBindingProperties());=20
'--- Set a data source for the row of data markers '--- %%=3DAddress.Street, %%=3DAddress.City, and '--- %%=3DAddress.State Dim addressvalues As String() =3D {"1330 Beacon St.", &= quot;Brookline", "MA"} Dim addressnames As String() =3D {"Street", "City&= quot;, "State"} xlt.BindRowData(addressvalues, _ addressnames, _ "Address" _ xlt.CreateDataBindingProperties())=20