SheetXL - v1.0.2
    Preparing search index...

    Interface Events

    Events for IWorksheet.

    interface Events {
        onAutoTableChange?(source: IWorksheet): void;
        onBeforeDelete?(source: IWorksheet): void;
        onBeforeLoad?(source: IWorksheet, json: IWorksheet.JSON): void;
        onBeforeSave?(source: IWorksheet): void | Promise<void>;
        onCellControlsChange?(source: IWorksheet): void;
        onClose?(source: IWorksheet): void;
        onColumnsHiddenChange?(source: IWorksheet): void;
        onCommentsChange?(source: IWorksheet): void;
        onConditionalFormatsChange?(source: IWorksheet): void;
        onDataChange?(source: IWorksheet, event: ChangeEvent): void;
        onDataValidationsChange?(source: IWorksheet): void;
        onDelete?(source: IWorksheet): void;
        onFreezePaneChange?(source: IWorksheet): void;
        onIndexChange?(source: IWorksheet): void;
        onInvalidated?(source: IWorksheet): void;
        onLayoutChange?(source: IWorksheet): void;
        onLoad?(source: IWorksheet): void;
        onMergesChange?(source: IWorksheet, event: ChangeEvent): void;
        onMovablesChange?(source: IWorksheet): void;
        onMovableSelectionChange?(source: IWorksheet): void;
        onNameChange?(source: IWorksheet): void;
        onPivotTablesChange?(source: IWorksheet): void;
        onProtectedRangesChange?(source: IWorksheet): void;
        onProtectionChange?(source: IWorksheet): void;
        onRequestFocus?(source: IWorksheet): Promise<boolean>;
        onRequestScrollIntoView?(
            source: IWorksheet,
            options: ScrollToOptions,
        ): Promise<boolean>;
        onRequestViewport?(source: IWorksheet): Promise<Bounds | null>;
        onRowsHiddenChange?(source: IWorksheet): void;
        onSave?(source: IWorksheet, json: IWorksheet.JSON): void;
        onSelectionChange?(source: IWorksheet): void;
        onSparklineGroupsChange?(source: IWorksheet): void;
        onSpillsChange?(source: IWorksheet, event: ChangeEvent): void;
        onStyleChange?(source: IWorksheet, event: ChangeEvent): void;
        onTabColorChange?(source: IWorksheet): void;
        onTablesChange?(source: IWorksheet): void;
        onTopLeftChange?(source: IWorksheet): void;
        onUsedRangeChange?(source: IWorksheet): void;
        onViewChange?(source: IWorksheet): void;
        onViewChange?(source: IWorksheet): void;
        onVisibilityChange?(source: IWorksheet): void;
        onZoomScaleChange?(source: IWorksheet): void;
    }
    Index
    • Called when the auto table is added or removed.

      Parameters

      Returns void

    • Called before delete. If any exception is thrown the exception will be returned to the client and delete will be aborted.

      Parameters

      Returns void

    • Called before load. If any exception is thrown this exception will be returned to the client and delete will fail.

      Parameters

      Returns void

    • Called before load. If any exception is thrown this exception will be returned to the client and delete will be aborted.

      Parameters

      Returns void | Promise<void>

    • Called when a cell control is added, removed, re-anchored or reordered.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange: a control is a format.

    • Called when the sheet is closed.

      Parameters

      Returns void

    • Called when which columns are hidden has changed.

      Parameters

      Returns void

    • Called when a comment is added, removed, edited, resolved, replied to or re-anchored.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange, since a cell paints its comment indicator.

    • Called when any conditional format is added, removed, re-anchored, reordered, or finishes (re)evaluating — a rule's results land asynchronously, after the calculation engine answers.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange. Listen here only when reacting to the rules themselves (an editor panel); renderers should listen to the class event instead.

    • Called when any data has changed.

      Parameters

      Returns void

      Values and formulas written or cleared, hyperlinks, a structural shift (insert, delete, move), a rename other sheets' formulas read through, and a calculation landing. Not formatting: that is onStyleChange. To listen for changes on data regions use ICellRange.addListener.

    • Called when any data validation is added, removed, re-anchored, or re-evaluates its results.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange. Listen here only when reacting to the validations themselves (an editor panel, the alert indicators); renderers should listen to the class event instead.

    • Called when the sheet is deleted.

      Parameters

      Returns void

    • Called when freeze or split settings have changed.

      Parameters

      Returns void

      This is a delegated event from the IWorksheetView.

    • Called when the index changes.

      Parameters

      Returns void

    • Called when the state has been updated due to a undo/redo and a rerender is required.

      Parameters

      Returns void

    • Called when the sizes of the cells change.

      Parameters

      Returns void

      One of the three coarse class events (see onStyleChange): the single subscription for "cell geometry moved".

      • This can be be due to row/column sizes changes or changing the max rows columns.
      • Zoom and viewport do not change the underlying layout.
    • Called when any merges are added or removed.

      Parameters

      • source: IWorksheet

        The sheet.

      • event: ChangeEvent

        Where the merges changed and the commit that changed them.

      Returns void

    • Called when any movables are added or removed.

      Parameters

      Returns void

    • Called when the movable selection changes.

      Parameters

      Returns void

      This is a delegated event from the IWorksheetView.

    • Called when the name changes.

      Parameters

      Returns void

    • Called when a pivot table changes: its style, its layout, or where it sits.

      Parameters

      Returns void

      Always accompanied by the coarse onStyleChange.

    • Called when protected ranges are added, removed, renamed, reordered or re-anchored.

      Parameters

      Returns void

      Always accompanied by the coarse onProtectionChange.

    • Called on any protection changes.

      Parameters

      Returns void

      One of the three coarse class events (see onStyleChange): the single subscription for "what the user may touch changed" — the sheet lock state, its allowed actions, and the protected ranges (onProtectedRangesChange) all raise it.

    • Request that the sheet become focused.

      Parameters

      Returns Promise<boolean>

      A promise indicating if the focus was honored.

      This should only be handled by one consumer.

    • Request that the sheet become focused.

      Parameters

      Returns Promise<boolean>

      A promise indicating if the focus was honored.

      This should only be handled by one consumer.

    • Request the visible viewport ("window") bounds in absolute sheet pixels — the one placement input the model can't derive itself. Used to center a bounds-less movable (e.g. a chart via IMovableCollection.AddOptions.autoPlace); when no consumer responds (headless) the add falls back to default cursor placement.

      Parameters

      Returns Promise<Bounds | null>

      This should only be handled by one consumer (the grid view).

    • Called when which rows are hidden has changed.

      Parameters

      Returns void

    • Called when the selection changes.

      Parameters

      Returns void

      This is a delegated event from the IWorksheetView.

    • Called when a sparkline group is added, removed or re-anchored.

      Parameters

      Returns void

    • Called if any spills occur.

      Parameters

      • source: IWorksheet

        The sheet.

      • event: ChangeEvent

        Where the spills changed, and the commit when a write (not a calculation) changed them.

      Returns void

    • Called when anything that affects how cells PAINT (other than data or layout) changes.

      Parameters

      Returns void

      One of the three coarse class events (with onLayoutChange and onProtectionChange): a single subscription for "the sheet may render differently", meant for renderers so they never have to accumulate the finer-grained events. It fires alongside each of them — direct and named style edits, table styling (onTablesChange), conditional formatting results (onConditionalFormatsChange, including their asynchronous evaluation completing), and data validation visuals (onDataValidationsChange) all raise it. Listen to a finer event only when reacting to that specific collection.

      A direct style edit, and its undo and redo, announce the ranges they wrote and their commit; the collections and the caches announce the whole sheet.

    • Called when the sheet tab color changes.

      Parameters

      Returns void

    • Called when any table are added or removed.

      Parameters

      Returns void

    • Called when the topLeft changes.

      Parameters

      Returns void

      This is a delegated event from the IWorksheetView.

    • Called when the UsedRange bounds changes.

      Parameters

      Returns void

      Useful when interested in knowing when the bounds of the area that is being used within the sheet changes; for example this is used by the scrollbars to adjust the size.

    • Called when the IWorksheetView changes.

      This is not called when individual properties on the view change.

      Parameters

      Returns void

    • Called when the view changes.

      Parameters

      Returns void

    • Called when the visibility changes..

      Parameters

      Returns void

    • Called when the zoom scale changes.

      Parameters

      Returns void

      This is a delegated event from the IWorksheetView.