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

    Interface SheetPasteOptions

    interface SheetPasteOptions {
        adjustCells?: CopyCellsCallback;
        author?: Author;
        autoFit?: boolean | AutoFitOptions;
        autoSelect?: boolean | SelectOptions;
        autoSelectRestore?: boolean | SelectOptions;
        contentsOnly?: boolean;
        description?: string;
        editMode?: EditMode<any>;
        expectedCommitId?: string;
        fitDestination?: boolean;
        includeHeaders?: boolean;
        isCut?: boolean;
        readOnly?: boolean;
        transpose?: boolean;
        type?: Content;
        undoRange?: ICellRange;
    }

    Hierarchy

    • PasteOptions
    • CopyOptions
      • SheetPasteOptions
    Index
    adjustCells?: CopyCellsCallback

    Callback to allow for additional customizations.

    author?: Author

    Who authored this change. Recorded on the commit (ICommit.getAuthor).

    the store's author, else null (unattributed)

    autoFit?: boolean | AutoFitOptions

    Fit the affected columns and rows to their content once the operation completes.

    false - sizes are left alone.

    The fit runs once, as the last write of the operation, so it measures the finished content and its sizes belong to the same undo entry - one undo puts both the content and the widths back.

    If set to true then autoFit will mimic the UI with the following options:

    {
    skipCustomSize: true,
    expandOnly: true,
    minContent: true
    }
    autoSelect?: boolean | SelectOptions

    Select the affected range once the operation completes.

    false - the selection is left alone.

    The selection is applied once, after the whole operation - within a batch, the last operation to ask for one wins. It is applied only if the selection is still where it was when the operation began: a user who moved while it ran keeps where they went.

    Pass it for an edit the user made. A script that passes neither this nor autoSelectRestore never moves the user, whether it runs, is undone or is redone.

    autoSelectRestore?: boolean | SelectOptions

    Select the affected range when the operation is undone or redone.

    autoSelect

    An undo lands where the operation began - for most operations the range they affected, for an auto-fill the template it was dragged from - and a redo where it left the user. Within a batch an undo lands where the first operation to ask says, a redo where the last one does.

    For an edit made from where the user already is, pass this without autoSelect: a value typed into a cell of a selected block leaves the block selected, and undoing it selects the cell.

    contentsOnly?: boolean

    If true then formatting will be ignored.

    false
    
    description?: string

    A human description.

    'determined by the set operation and locale'
    
    editMode?: EditMode<any>

    When performing a copy the editMode type to use.

    'copy'
    
    expectedCommitId?: string

    Optimistic concurrency guard. If set, the operation only begins if the store's current commit id matches; otherwise a TransactionConflictError is thrown.

    The check happens atomically as the root transaction begins — there is no window between check and commit. If any transaction is already open the check fails with reason open (the head could move beneath the operation).

    fitDestination?: boolean

    When pasting from a smaller range to a larger range copy will repeat or 'wallpaper' the source values.

    Note - If the destination range is only a single cell then fitDestination will always be applied.

    includeHeaders?: boolean

    Indicates if the header (size) should be copied.

    The default is to only copy the headers if the range is entire header span.

    isCut?: boolean

    Indicates if a cut is desired.

    false
    
    readOnly?: boolean

    Declares the operation read-only: any state update within it throws.

    false
    

    Writes are tracked automatically — a batch that performs no updates never creates a commit (no new commit id, no events, no undo entry) whether or not this is set. The flag is purely an assertion for callers that want the guarantee enforced. Nested transactions inherit it; they cannot opt back out.

    transpose?: boolean

    Have the data transposed for the original axis.

    false
    
    type?: Content

    Indicate which items are copied.

    undoRange?: ICellRange

    Allows for undo to range selection to be altered.

    TODO - API leakage - This is used to during drag.