Introduced in build 7.1.0.1855
Description
Sets a SharePoint List as a template data source.
C#
vb.net
Parameters
template
The current ExcelTemplate object which is calling BindDatalist
SharePoint List to use as a data source for the templatedataSourceName
Name of the data source in the templateproperties
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.
Exceptions
ArgumentNullException
BindData
will throw this exception if null
(C#) or Nothing
(VB.NET) is passed to the method.
ArgumentException
Remarks
You can set several data sources for a single template. Use the following methods to set template data sources: BindCellData, BindColumnData, BindRowData, and BindData.