The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

Worksheet.Name Property

Gets or sets the name of the worksheet .

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

string Name { get; set; }
Property Name As String
string Name { get; set; }
Property Name As String
string Name { get; set; }
Property Name As String

Property Value

Type Description
String

A String value which specifies the worksheet name.

Property Value

Type Description
String

A String value which specifies the worksheet name.

Property Value

Type Description
String

A String value which specifies the worksheet name.

Remarks

When naming a worksheet, take into account the following constraints.

  • A worksheet name must not be equal to a name that is already contained in the collection of existing worksheets (IWorkbook.Worksheets).
  • A worksheet name must not exceed 31 characters.
  • A worksheet name must not contain the following symbols: , /, ?, :, *, [ or ]
  • The worksheet name must not start and end with a single quote (').
  • A worksheet name must not be an empty string.

Worksheet Indexes

To add a new worksheet under the specified name to the workbook, use the WorksheetCollection.Add or WorksheetCollection.Insert method with the worksheet name passed as a parameter.

Examples

This example demonstrates how to rename a worksheet. To do this, use the Worksheet.Name property of the corresponding Worksheet object.

// Change the name of the second worksheet.
workbook.Worksheets[1].Name = "Renamed Sheet";
See Also