Back to Devexpress

ExcelWorksheetSettings.WorksheetName Property

corelibraries-devexpress-dot-dataaccess-dot-excel-dot-excelworksheetsettings.md

latest5.1 KB
Original Source

ExcelWorksheetSettings.WorksheetName Property

Gets or sets the name of the worksheet from which data is imported.

Namespace : DevExpress.DataAccess.Excel

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
public string WorksheetName { get; set; }
vb
Public Property WorksheetName As String

Property Value

TypeDescription
String

A String value that specifies the name of the worksheet from which data is imported.

|

Remarks

The following example shows how to select the A1:F20 range of cells located on the Sheet1 worksheet using the WorksheetName and ExcelWorksheetSettings.CellRange properties.

csharp
ExcelWorksheetSettings worksheetSettings = new ExcelWorksheetSettings();
worksheetSettings.WorksheetName = "Sheet1";
worksheetSettings.CellRange = "A1:F20";
vb
Dim worksheetSettings As New ExcelWorksheetSettings()
worksheetSettings.WorksheetName = "Sheet1"
worksheetSettings.CellRange = "A1:F20"

The following code snippets (auto-collected from DevExpress Examples) contain references to the WorksheetName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

asp-net-mvc-grid-upload-excel-file-using-upload-control-and-display-data-in-grid/CS/T449148/Models/Model.cs#L27

csharp
ExcelWorksheetSettings excelWorksheetSettings = new ExcelWorksheetSettings();
excelWorksheetSettings.WorksheetName = "Sheet1";

data-access-library-create-data-sources-at-runtime/CS/ExcelDataSourceSnippets/Code.cs#L33

csharp
ExcelWorksheetSettings excelWorksheetSettings = new ExcelWorksheetSettings();
excelWorksheetSettings.WorksheetName = "Sheet_Categories";

asp-net-mvc-grid-upload-excel-file-using-upload-control-and-display-data-in-grid/VB/T449148_VB/Models/Model.vb#L13

vb
Dim excelWorksheetSettings As ExcelWorksheetSettings = New ExcelWorksheetSettings()
excelWorksheetSettings.WorksheetName = "Sheet1"
Dim excelSourceOptions As ExcelSourceOptions = New ExcelSourceOptions()

reporting-winforms-bind-excel-runtime/VB/BindingReportToExcelWorkbook/Form1.vb#L25

vb
Dim excelWorksheetSettings As ExcelWorksheetSettings = New ExcelWorksheetSettings()
excelWorksheetSettings.WorksheetName = "Sheet_Categories"
' Specify import settings.

winforms-dashboard-bind-pie-item-to-data-in-code/VB/Dashboard_CreatePies/Form1.vb#L25

vb
Dim importSettings = New DevExpress.DataAccess.Excel.ExcelWorksheetSettings()
importSettings.WorksheetName = "Data"
importSettings.CellRange = "A1:L100"

data-access-library-create-data-sources-at-runtime/VB/ExcelDataSourceSnippets/Code.vb#L31

vb
Dim excelWorksheetSettings As New ExcelWorksheetSettings()
excelWorksheetSettings.WorksheetName = "Sheet_Categories"

See Also

ExcelWorksheetSettings Class

ExcelWorksheetSettings Members

DevExpress.DataAccess.Excel Namespace