SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface IOutline

    The row and column groups on a sheet, and how they are laid out.

    There is no group object to create or delete. Every row and column carries an outline level, 0 to 7 (ICellHeader.getOutlineLevel), and a group at level n is a run of consecutive rows (or columns) whose level is n or more. Its summary row is the one just past the run, on the side getSummaryDirection names. Collapsing a group hides its detail rows.

    Groups are made and removed with ICellRange.group and ICellRange.ungroup, or from the sheet's formulas with autoOutline, and collapsed and expanded with ICellRange.hideGroupDetails and ICellRange.showGroupDetails. Whether the symbols are drawn is the view's: ISheetView.setShowOutlineSymbols.

    The counterpart of Excel's Worksheet.Outline.

    interface IOutline {
        isIOutline: true;
        addListeners(
            listeners: Callbacks<SOURCE, EVENTS>,
            options?: IListener.Options,
        ): Remove;
        autoOutline(options?: ITransaction.OperationOptions): this;
        clear(axes?: AxisSelection, options?: ITransaction.OperationOptions): this;
        getGroups(axis: Axis, options?: GetGroupsOptions): readonly Group[];
        getLevelCount(axis: Axis): number;
        getSummaryDirection(axis: Axis): Direction;
        isAutomaticStyles(): boolean;
        setAutomaticStyles(
            automatic: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setSummaryDirection(
            axis: Axis,
            direction: Direction,
            options?: ITransaction.OperationOptions,
        ): this;
        setVisibleLevels(
            axis: Axis,
            levels: number,
            options?: ITransaction.OperationOptions,
        ): this;
        toJSON(): IOutline.JSON | null;
    }

    Hierarchy (View Summary)

    Index
    isIOutline: true

    For runtime type checking.

    • Outlines the sheet from its formulas: a cell whose formula totals the cells on one side of it in its own column makes its row a summary row and those rows a group, and the same for columns.

      Parameters

      Returns this

      The current IOutline.

      Error If no summary rows or columns are found, or the sheet is protected.

      The counterpart of Excel's Range.AutoOutline, which outlines the whole sheet whatever the range. Any outline the sheet already has is removed first, and the summary direction of each axis is set to where its first summary sits: below and right, or above and left.

    • Removes every outline level from the sheet. Hidden rows and columns stay hidden.

      Parameters

      Returns this

      The current IOutline.

      Error If the sheet is protected.

      The whole-sheet form of ICellRange.clearGroups, which is what Excel's Clear Outline does with one cell selected.

    • The groups on an axis, outermost level first and in order within a level.

      Parameters

      • axis: Axis

        The axis.

      • Optionaloptions: GetGroupsOptions

        Limits the groups returned.

      Returns readonly Group[]

    • The deepest outline level in use on the axis; 0 when nothing is grouped.

      Parameters

      • axis: Axis

      Returns number

    • Where a group's summary sits: down or up for rows, right or left for columns.

      Parameters

      • axis: Axis

      Returns Direction

      down for rows, right for columns.

    • Whether the automatic outline styles are applied to summary rows and columns.

      Returns boolean

      false
      
    • Sets where a group's summary sits.

      Parameters

      Returns this

      Error If the direction does not belong to the axis (left for rows).

    • Expands the groups up to a level and collapses everything deeper, as the level buttons do.

      Parameters

      • axis: Axis

        The axis.

      • levels: number

        How many levels stay visible, from 1 (only the outermost summaries); more levels than exist shows every row or column.

      • Optionaloptions: ITransaction.OperationOptions

      Returns this

      The counterpart of Excel's Outline.ShowLevels and Office Scripts' showOutlineLevels, one axis at a time.

    • The settings that differ from their defaults, or null when none do.

      Returns IOutline.JSON | null

      The levels themselves are saved with the rows and columns, not here.