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:vb.net} Public Property WorksheetName() As String {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} |
Page History
Overview
Content Tools