modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Type Alias RewriteAction

    RewriteAction:
        | { count: number; sheet?: string; start: number; type: "insert_rows" }
        | { count: number; sheet?: string; start: number; type: "delete_rows" }
        | { count: number; sheet?: string; start: number; type: "insert_cols" }
        | { count: number; sheet?: string; start: number; type: "delete_cols" }

    A row or column insert/delete that rewriteFormula applies to the references in a formula.

    • start uses a different base per axis. For insert_rows and delete_rows it is a 1-based row number as written in A1 notation (3 is row 3). For insert_cols and delete_cols it is a 0-based column index (0 is column A, 2 is column C).
    • An insert shifts every reference at index >= start by count.
    • A delete removes [start, start + count): a cell ref inside it becomes #REF!, a range shrinks (or becomes #REF! when wholly inside it), and later references shift back by count.
    • sheet names the sheet whose qualified references are rewritten; the name matches ignoring case, as in Excel. When it is undefined, only unqualified references (no sheet prefix) are touched.

    The row/column base asymmetry is kept for 1.x compatibility and will be unified in 2.0.