[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISheetTabs.Item

this Property

this[int]

Gets the sheet tab at the specified index. The index starts at 0.

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

The index of the sheet tab, starting at 0.

Property Value
Type Description
ISheetTab

The sheet tab at the specified index, or null if no sheet tab exists at that index.

Examples
workbook.Open("import.sjs");
ISheetTabs sheetTabs = workbook.SheetTabs;
if (sheetTabs.Count > 0)
{
    ISheetTab firstTab = sheetTabs[0];
    string name = firstTab.Name;
}

this[string]

Gets the sheet tab with the specified name.

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

The name of the sheet tab.

Property Value
Type Description
ISheetTab

The sheet tab with the specified name, or null if no matching sheet tab exists.

Examples
workbook.Open("import.sjs");
ISheetTabs sheetTabs = workbook.SheetTabs;
if (sheetTabs.Count > 0)
{
    ISheetTab firstTab = sheetTabs[0];
    ISheetTab sameTab = sheetTabs[firstTab.Name];
    string name = sameTab.Name;
}