Interface ISheetModelListener

A listener for changes to the ISheetView object.

interface ISheetModelListener {
    onOperation?: ((operationName) => Promise<(() => void)> | (() => void));
    onCellsChange?(): void;
    onClose?(): void;
    onDelete?(model): void;
    onDrawingSelectionChange?(update): void;
    onDrawingsChange?(): void;
    onFreezeSplitChange?(update): void;
    onLayoutChange?(): void;
    onMergesChange?(): void;
    onProtectionChange?(): void;
    onSelectionChange?(update): void;
    onStyleChange?(): void;
    onTabColorChange?(): void;
    onTopLeftChange?(update): void;
    onViewChange?(update): void;
}

Hierarchy (view full)

Properties

onOperation?: ((operationName) => Promise<(() => void)> | (() => void))

Called when a long running operation is started. This is useful to give the user feedback that the operation is still running.

Type declaration

    • (operationName): Promise<(() => void)> | (() => void)
    • Parameters

      • operationName: string

      Returns Promise<(() => void)> | (() => void)

Remarks

This must return a function or a promise to a function that can be called when the operation is complete This will not always be called as some operations may determine that they would be to 'quick'.

Methods

  • If any cell changes

    Returns void

    Remarks

    For specific changes use addRangeListener

  • Called when the sheet is closed

    Returns void

  • Called when delete is called.

    Parameters

    Returns void

  • If any drawing changes

    Returns void

  • If the row/column sizes have changed

    Returns void

  • If any merge changes

    Returns void

  • If any protection changes

    Returns void

  • Convenience method that listens to all changes on the style.

    Returns void

  • Called when the sheet tab color changes

    Returns void

  • Called when the SheetView object changes.

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

    Parameters

    Returns void