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

    Options for adding a named formula to the collection.

    interface AddOptions {
        author?: Author;
        autoSelect?: boolean | ITypes.SelectOptions;
        cell?: ICell.Address;
        comment?: string;
        description?: string;
        expectedCommitId?: string;
        expression: string;
        hidden?: boolean;
        name: string;
        readOnly?: boolean;
        replaceExisting?: boolean;
        scope?: string | null;
    }

    Hierarchy (View Summary)

    Index
    author?: Author

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

    the store's author, else null (unattributed)

    autoSelect?: boolean | ITypes.SelectOptions

    If true or set then this will select the affect item after the transaction is complete.

    If this is set to true then any restore will also select.

    cell?: ICell.Address

    Optional reference for the formula.

    comment?: string

    Optional comment for the named formula.

    description?: string

    A human description.

    'determined by the set operation and locale'
    
    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).

    expression: string

    Required. The formula expression string, e.g. "=SUM(A:A)".

    hidden?: boolean

    If true the named formula is not visible in the UI.

    false
    
    name: string

    Required. The name that identifies this formula in expressions.

    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.

    replaceExisting?: boolean

    If true, redefine an existing name in the same scope instead of throwing.

    false
    

    Mirrors INamedCollection.addFormula and the Name Manager, where editing an existing name is a redefinition. Without it a collision throws — a silent no-op would drop the new expression on the floor.

    scope?: string | null

    A string identifying the scope. This is normally a sheet name.

    null — global scope