Gets a worksheet by its name.
NuGet Package: DevExpress.Spreadsheet.Core
A String value that specifies the name of the worksheet to get.
A Worksheet object that is the worksheet with the specified name.
Use the Item property to obtain a worksheet by its name from the workbook’s collection of worksheets. When searching, the name parameter value is compared to the Worksheet.Name property of worksheet objects. If no matches are found, an exception is thrown. To check whether a worksheet with the specified name exists in the collection, use the Contains property.
A worksheet can be also accessed by its index in the collection.
To get an individual worksheet by its index or name, use the
using DevExpress.Spreadsheet; // ... Workbook workbook = new Workbook(); // Access a collection of worksheets. WorksheetCollection worksheets = workbook.Worksheets; // Access a worksheet by its index. Worksheet worksheet1 = workbook.Worksheets; // Access a worksheet by its name. Worksheet worksheet2 = workbook.Worksheets["Sheet2"];