Interface CopyCellsSource

Useful for when we are not copying from the current sheet. This abstraction exists to allow for custom sources such as a clipboard.

Remarks

There is a default implementation SheetCopySource that can be used to copy between sheets.

interface CopyCellsSource {
    isCopyCellsSource: true;
    getCopyableItems?(): CopyableItemSource[];
    isCut?(): boolean;
    name?(): string;
    onCancel?(): void;
    onCopy?(): boolean;
    onPaste?(): boolean;
    rangeFrom(): CellRangeCoords;
    scanCells(visitor, options?): void;
    scanColHeaders?(visitor, options?): void;
    scanRowHeaders?(visitor, options?): void;
}

Hierarchy (view full)

Implemented by

Properties

isCopyCellsSource: true

For runtime introspection.

Methods

  • Flag to indicate if the operation is expected to be a cut.

    Returns boolean

    Default Value

    false
    
  • The name of a the copy source. Useful for user interactions.

    Returns string

    Remarks

    SheetCopySource uses the sheet name to detect intersections.

  • Notify when the paste operation is cancelled.

    Returns void

  • This is called when the copy has read the source If copy should not be allowed (for example a read only sheet) then return false

    Returns boolean

  • Notify when the paste operation is complete.

    Returns boolean

  • Scan the values of the source range

    Parameters

    Returns void