[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IWorksheets.Item

this Property

this[int]

Gets the worksheet using the index.

Declaration
IWorksheet this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As IWorksheet
Parameters
Type Name Description
int index

The index.

Property Value
Type Description
IWorksheet

The worksheet at the specified index.

Examples
IWorksheets worksheets = workbook.Worksheets;
IWorksheet firstSheet = worksheets[0];
string name = firstSheet.Name;

this[string]

Gets the worksheet using the name.

Declaration
IWorksheet this[string name] { get; }
ReadOnly Default Property Item(name As String) As IWorksheet
Parameters
Type Name Description
string name

The worksheet's name.

Examples
worksheet.Name = "Data";
IWorksheet dataSheet = workbook.Worksheets["Data"];
string name = dataSheet.Name;

this[string[]]

Gets worksheets by names.

Declaration
IWorksheets this[string[] name] { get; }
ReadOnly Default Property Item(name As String()) As IWorksheets
Parameters
Type Name Description
string[] name

An array that represents names of worksheets.

Examples
worksheet.Name = "Data";
workbook.Worksheets.Add().Name = "Summary";
IWorksheets sheets = workbook.Worksheets[new string[] {"Data", "Summary"}];
int count = sheets.Count;