Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
string[] onedim = {"SoftArtisans", "OfficeWriter", "ExcelTemplate"};x
xltlt.BindColumnData(onedim, "SimpleArray",xlt.CreateDataBindingProperties());

...

ExcelTemplate.BindColumnData sets a data source for a template column to a 1-dimensional array of objects. The method's first parameter, onedim, is the data source array. The second parameter, "SimpleArray", is the name of the template data marker to which the data source binds. The third parameter, xlt.CreateDataBindingProperties(), is a DataBindingProperties object that contains values that change how the data are bound to the template; in this case, the default property values are used.

 

The method BindData binds the data markers *%%=TwoDimArray.#1*, *%%=TwoDimArray.#2*, and *%%=TwoDimArray.#3* to a 2-dimensional string array:

...