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

    Options for adding an IProtectedRange.

    replaceExisting redefines the entry at index when it covers exactly the same ranges; the entry keeps its name unless a free one is supplied — see IAnchored.AddOptions.replaceExisting.

    interface AddOptions {
        author?: Author;
        autoSelect?: boolean | ITypes.SelectOptions;
        description?: string;
        expectedCommitId?: string;
        index?: number;
        name?: string;
        password?: Partial<EncryptedPassword>;
        readOnly?: boolean;
        replaceExisting?: boolean;
        securityDescriptor?: string;
    }

    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.

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

    index?: number

    Position in the collection. 0 is first — for a conditional format, the highest priority.

    0 — a new item goes first, as in Excel.
    
    name?: string

    The unique name for this entry.

    Required by OOXML and unique within the sheet, but unrelated to the ranges it covers — it is a label, not a defined name, and never resolves as a reference.

    password?: Partial<EncryptedPassword>

    The encrypted password. An absent value means the range needs no password.

    Never the plain text — see IProtectedRange.setPassword.

    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

    Redefine the item already at index instead of inserting, when it is anchored to exactly the same ranges (discontiguous ranges compare area by area, in authored order).

    false
    

    Only the item at index is considered, as in Excel. What counts as the same item is per collection: a data validation or protected range matches on ranges alone; a conditional format only redefines a scale rule (data bar, color scale, icon set) of the same kind — a style rule always inserts, since several may apply to one cell, whereas a second scale of one kind on the same ranges could never render.

    securityDescriptor?: string

    The relative security descriptor, or null if there is none.

    Names the user accounts that may edit this range without supplying a password, e.g. "O:WDG:WDD:(A;;CC;;;AN)". SheetXL does not evaluate this — it is preserved for round-trip until the user identity system lands.