Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
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#
Wiki Markup
{description}
{excerpt}Sets or returns the name of the worksheet to which the data will be bound during an [ExcelTemplate.BindData], [ExcelTemplate.BindCellData|ExcelTemplate.BindCellData(Object, String, DataBindingProperties)], [ExcelTemplate.BindColumnData], or [ExcelTemplate.BindRowData] method call. 
{excerpt}
{signature:C#}
 public System.String WorksheetName{ get; set; }
Signature
{signature}{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.

{signature}
{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|DataBindingProperties.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.

{remarks}
{example}{code:csharp|title=C#}

          DataBindingProperties dbp = xlt.CreateDataBindingProperties();
          dbp.WorksheetName = "first worksheet";
          xlt.BindData(twodim, names, "TwoDimArray", dbp);
          xlt.Save(Page.Response, "output.xls", false);
        
{code}
{code:vb.net
|title=vb.net
}

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

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle