Search Results for

    Show / Hide Table of Contents

    ExcelFile.GetSheetIndex Method

    Overloads

    • ExcelFile.GetSheetIndex(String)
    • ExcelFile.GetSheetIndex(String, Boolean)

    ExcelFile.GetSheetIndex(String)

    Finds a sheet name on the workbook and returns its index. If it doesn't find the sheet it will raise an exception. See GetSheetIndex(String, Boolean) for a method that will not throw an exception. To change the active sheet by the name, use ActiveSheetByName. See also GetSheetName

    Syntax

    Namespace: FlexCel.Core

    public Int32 GetSheetIndex(String sheetName)

    Parameters

    <-> Parameter Type Description
    sheetName String Sheet you want to find.

    Returns

    The sheet index (1-based) if the sheet exists, or throws an Exception otherwise.

    See also

    • ExcelFile

    ExcelFile.GetSheetIndex(String, Boolean)

    Finds a sheet name on the workbook and returns its index. Depending on the "throwException" parameter, this method will raise an exception or return -1 if the sheet does not exist. To change the active sheet by the name, use ActiveSheetByName. See also GetSheetName

    Syntax

    Namespace: FlexCel.Core

    public abstract Int32 GetSheetIndex(String sheetName, Boolean throwException)

    Parameters

    <-> Parameter Type Description
    sheetName String Sheet you want to find.
    throwException Boolean When sheetName does not exist, having throwException = true will raise an Exception. throwException = false will return -1 if the sheet is not found.

    See also

    • ExcelFile
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com