Skip to end of metadata
Go to start of metadata

Description

Sets an object as a data source for a single cell in a template.

C#
vb.net

Parameters

cellData
An object to use as the data source.
dataMarkerName
The name of the template data marker at which to insert the data source value. This parameter must be specified, but can be null or an empty string when setting the first data source to bind to the template.
property
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
BindCellData 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.

Examples

C#
vb.net
  • No labels