Message-ID: <348512563.7759.1711620319409.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7758_1100147719.1711620319409" ------=_Part_7758_1100147719.1711620319409 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Sets a rectangular array of objects as a template data source.
=20public void BindData(System.Object[,] arrayData, System.String[] columnNam= es, System.String dataSourceName, DataBindingProperties property)=20
Public Sub BindData(ByVal arrayData As Object(,), ByVal columnNames As Stri= ng(), ByVal dataSourceName As String, ByVal [property] As DataBindingProper= ties)=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
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
PowerPointTemplate.CreateDataBindingProperties()
as the=20
property
value.=20
BindData
will throw this exception if=20
null
(C#) or=20
Nothing
(VB.NET) is passed to the method.=20
PowerPointTemplate pptt =3D new PowerPointTemplate(); pptt.Open(Page.MapPath("./ArrayBindingTemplate2.xls")); //--- Create an array of names and an array of data //--- source values and bind the data source to the //--- template data markers //--- %%=3DTwoDimArray.FirstName //--- %%=3DTwoDimArray.LastName //--- %%=3DTwoDimArray.Position string[,] twoDimNormal =3D { {"Nancy", "Davolio", "Sales Manager= "}, {"Michael", "Suyama", "HR Represent= ative"}, {"Adrian", "King", "IS Support"= ;} }; string[] names =3D {"FirstName", "LastName", = "Position"}; pptt.BindData(twoDimNormal, names, "TwoDimArray", pptt.CreateDataBindingProperties());=20
Dim pptt As New PowerPointTemplate() pptt.Open(Page.MapPath("./ArrayBindingTemplate2.xls")) '--- Create an array of names and an array of data '--- source values and bind the data source to the '--- template data markers '--- %%=3DTwoDimArray.FirstName '--- %%=3DTwoDimArray.LastName '--- %%=3DTwoDimArray.Position Dim twoDimNormal(,) As String =3D New String(,){ _ {"Nancy", "Davolio", "Sales Manager= "}, _ {"Michael", "Suyama", "HR Represent= ative"}, _ {"Adrian", "King", "IS Support"= ;}} Dim names As String() =3D {"FirstName", "LastName&= quot;, "Position"} pptt.BindData(twoDimNormal, _ names, _ "TwoDimArray", _ pptt.CreateDataBindingProperties())=20