Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

Sets or returns the name of the worksheet to which the data will be bound during an ExcelTemplate.BindData, ExcelTemplate.BindCellData, ExcelTemplate.BindColumnData, or ExcelTemplate.BindRowData method call.

Signature
C#
C#
 public System.String WorksheetName{ get; set; }
Signature
vb.net
vb.net
Public Property WorksheetName() As String
Remarks

By specifying the worksheet name, you can import from different data sources for the same data marker in different worksheets within the same workbook. The default value for WorksheetName is null (Nothing in VB.NET), meaning that the data source will be applied to the data marker for the entire workbook.

WorksheetName is a Read/Write property.

Example
Code Block
csharp
csharp
titleC#

          DataBindingProperties dbp = xlt.CreateDataBindingProperties();
          dbp.WorksheetName = "first worksheet";
          xlt.BindData(twodim, names, "TwoDimArray", dbp);
          xlt.Save(Page.Response, "output.xls", false);
        
Code Block
vb.net
vb.net
titlevb.net

          Dim dbp As DataBindingProperties = xlt.CreateDataBindingProperties()
          dbp.WorksheetName = "first worksheet"
          xlt.BindData(twodim, names, "TwoDimArray", dbp)
          xlt.Save(Page.Response, "output.xls", False)