SheetXL - v0.8.0-beta.25
    Preparing search index...

    Interface ISheet

    A tab in a workbook: a worksheet, or one of the sheet kinds that hold no cells.

    Every kind shares one name space, one tab order and one set of visibility rules, so the members here apply to all of them. What a sheet holds depends on its kind:

    • 'worksheet' is the grid, IWorksheet.
    • 'chart' is a chart sheet: one chart filling the tab.
    • 'macro' is an Excel 4.0 macro sheet.
    • 'dialog' is an Excel 5 dialog sheet.

    The last three are opaque: they are carried as read and written back unchanged.

    Use IWorkbook.getSheets for every tab and IWorkbook.getWorksheets for the grids.

    interface ISheet {
        isISheet: true;
        addListeners(
            listeners: ISheet.IListeners,
            options?: IListener.Options,
        ): Remove;
        close(): void;
        delete(): void;
        getId(): string;
        getIndex(): number;
        getKind(): ISheet.Kind;
        getName(): string;
        getTabColor(): IColor;
        getVisibility(): ISheet.Visibility;
        getWorkbook(): IWorkbook | null;
        isClosed(): boolean;
        isDeleted(): boolean;
        select(options?: ITypes.SelectOptions): Promise<ISheet>;
        setIndex(index: number): this;
        setName(name: string, options?: ITransaction.OperationOptions): this;
        setTabColor(color: string | IColor | null): this;
        setVisibility(
            visibility?: boolean | ISheet.Visibility,
            options?: ITransaction.OperationOptions,
        ): ISheet;
    }

    Hierarchy (View Summary)

    Index
    isISheet: true

    For runtime type checking.

    • Free all resources associated with the sheet.

      Returns void

      Called by the workbook when it is closed. This is different than delete, which removes the sheet from the workbook.

    • Removes the sheet from its workbook.

      Returns void

    • The sheet's id: what formulas and operations identify it by. Unique among all in-memory sheets.

      Returns string

    • Returns the position of the sheet among every sheet in its workbook, hidden ones and every kind included.

      Returns number

      Will return -1 if not in a workbook.

    • Returns the display name for the sheet.

      Returns string

    • Return a custom color or null if no custom color has been set.

      Returns IColor

      null
      
    • Returns the IWorkbook for the sheet.

      Returns IWorkbook | null

      This may be null if not created via a workbook.

    • Returns true if the sheet has been closed.

      Returns boolean

    • Returns if the sheet has been deleted from its workbook.

      Returns boolean

    • Moves the sheet in the tab order.

      Parameters

      • index: number

      Returns this

      This is zero-based.

    • Set the tab color for the sheet.

      Parameters

      • color: string | IColor | null

        The color

      Returns this

      If set to null the color will revert to the default.