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

    Interface MergeOptions

    Options for ICellRange.merge.

    interface MergeOptions {
        arrayFixed?: boolean;
        author?: Author;
        autoFit?: boolean | AutoFitOptions;
        autoFormat?: boolean;
        autoSelect?: boolean | ICellRange.SelectOptions;
        autoSelectRestore?: boolean | ICellRange.SelectOptions;
        axes?: AxisSelection;
        axis?: Axis;
        description?: string;
        discardMultipleValues?: boolean;
        expectedCommitId?: string;
        readOnly?: boolean;
        skipBoundsCheck?: boolean;
        textParser?: boolean | ModifiersFromStringOptions;
    }

    Hierarchy (View Summary)

    Index
    arrayFixed?: boolean

    Enter a single formula as an array formula (Excel's Ctrl+Shift+Enter) over the whole range.

    false

    The range is the block's extent and the formula sits at its top-left; the result is fitted to the extent rather than spilling from it - a dimension of 1 broadcasts, a longer one is clipped, a shorter one is padded with #N/A - and the block never resizes. Its cells can only be changed as a whole: overwriting, clearing, or inserting/deleting through part of a block is refused ("You can't change part of an array"); rewriting it through this option with the same range replaces it.

    Only meaningful for ICellRange.setFormula with one formula.

    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
    }
    autoFormat?: boolean

    Give each entered formula the number format of the first cell it reads that has one, or failing that the format its result carries, once it has been calculated.

    false - the cell keeps the format it has.

    What typing a formula into a cell does: =A1*2 shows currency when A1 does, =NOW() shows a date, =DATE(2024,1,15) a short date. A cell the formula reads ranks ahead of a function's format (=A1+TODAY() is currency when A1 is); references are taken in the order written, a range stands for its top-left cell, and a reference a function only points at (=ROW(A1), =OFFSET(A1,0,0)) does not count. The format becomes the cell's own, exactly as if set by hand, so it stays when the formula is replaced by a value and is part of the same undo entry as the formula. A format the cell already had wins.

    Only the formulas this operation enters are formatted, and only when they are first compiled and calculated - a later recalculation of the same cell changes nothing, and neither does formatting a cell it reads. Pair with OperationOptions.autoFit to also widen a column the formatted result no longer fits.

    autoSelect?: boolean | ICellRange.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 | ICellRange.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.

    axes?: AxisSelection

    The axes of the merge.

    IRange.AxisSelection.Both
    
    axis?: Axis

    Specifies the direction for iterating over the range (row-major or column-major).

    IRange.Axis.Row

    Both SetValuesOptions and GetValuesOptions allow for IRange.Axiss.

    description?: string

    A human description.

    'determined by the set operation and locale'
    
    discardMultipleValues?: boolean

    If true then merge will merge even if there is more than one value.

    false
    
    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).

    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.

    skipBoundsCheck?: boolean

    Skip the bounds check when setting values.

    When set to true, this option allows value arrays to exceed the dimensions of the range. This is useful for setting values in a table where the range is smaller than the data, but determining the exact size requires processing the entire dataset.

    textParser?: boolean | ModifiersFromStringOptions

    By default setValue will attempt to parse text values into a native type. This can be disabled or customized using the parseText flag. Setting this to false will use the raw text value.