Back to Devexpress

SheetCollection.Item[String] Property

officefileapi-devexpress-dot-spreadsheet-dot-sheetcollection-dot-item-x28-system-dot-string-x29.md

latest2.0 KB
Original Source

SheetCollection.Item[String] Property

Provides access to an individual sheet in the collection by its name.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
Sheet this[string name] { get; }
vb
ReadOnly Property Item(name As String) As Sheet

Parameters

NameTypeDescription
nameString

A String value that specifies the name of the sheet to obtain.

|

Property Value

TypeDescription
Sheet

A worksheet or chart sheet with the specified name.

|

Remarks

Use the Item property to obtain a sheet by its name from the workbook’s sheet collection. When searching, the name parameter value is compared to the Name property of worksheets and chart sheets contained in the workbook. If no matches are found, an exception is thrown. To check whether a sheet with the specified name exists in the collection, use the SheetCollection.Contains method.

A sheet can be also accessed by its index in the collection.

See Also

Contains

SheetCollection Interface

SheetCollection Members

DevExpress.Spreadsheet Namespace