Interface SheetJSON

interface SheetJSON {
    cols?: ColumnHeaderJSON[];
    comments?: any;
    data?: CellsRow[];
    drawings?: DrawingAnchorJSON<DrawingJSON>[];
    merged?: string[];
    protectedRanges?: Partial<{
        name: string;
        range: string | CellRangeCoords | Partial<{
            colEnd: string | number;
            colStart: string | number;
            rowEnd: string | number;
            rowStart: string | number;
        }>;
        verifier?: string | ModificationVerifier | Partial<{
            algorithmName?: string;
            hashValue: string;
            saltValue?: string;
            spinCount?: string | number;
        }>;
    }>[];
    protection?: Partial<{
        autoFilter: string | Partial<boolean>;
        deleteColumns: string | Partial<boolean>;
        deleteRows: string | Partial<boolean>;
        formatCells: string | Partial<boolean>;
        formatColumns: string | Partial<boolean>;
        formatRows: string | Partial<boolean>;
        insertColumns: string | Partial<boolean>;
        insertHyperlinks: string | Partial<boolean>;
        insertRows: string | Partial<boolean>;
        objects: string | Partial<boolean>;
        pivotTables: string | Partial<boolean>;
        scenarios: string | Partial<boolean>;
        selectLockedCells: string | Partial<boolean>;
        selectUnlockedCells: string | Partial<boolean>;
        sheet: string | Partial<boolean>;
        sort: string | Partial<boolean>;
        verifier: string | ModificationVerifier | Partial<{
            algorithmName?: string;
            hashValue: string;
            saltValue?: string;
            spinCount?: string | number;
        }>;
    }>;
    resources?: SharedResourceJSON[];
    rows?: RowHeaderJSON[];
    style?: SheetStyleJSON;
    tabColor?: Partial<{
        val: string;
        adjustments: any;
        asCSS: any;
        isEqual: any;
        isImmutable: any;
        toHSLA: any;
        toHex: any;
        toJSON: any;
        toRGBA: any;
        toString: any;
    }>;
    tables?: Partial<{
        autoFilter?: string | AutoFilter | Partial<{
            filterColumns?: any;
            ref?: string;
            sortState?: any;
        }>;
        columns?: string | TableColumn[] | (string | TableColumn | Partial<{
            name: string;
        }>)[];
        displayName?: string;
        headerRowCount?: string | number;
        name: string;
        ref: string | CellRangeCoords | Partial<{
            colEnd: string | number;
            colStart: string | number;
            rowEnd: string | number;
            rowStart: string | number;
        }>;
        sortState?: any;
        styleInfo?: string | TableStyleInfo | Partial<{
            name: string;
            showColumnStripes?: string | Partial<boolean>;
            showFirstColumn?: string | Partial<boolean>;
            showLastColumn?: string | Partial<boolean>;
            showRowStripes?: string | Partial<boolean>;
        }>;
        totalsRowCount?: string | number;
    }>[];
    threadedComments?: any;
    view?: Partial<{
        columnHeaderStyle: string;
        drawingSelection: string | readonly IDrawingModel<DrawingJSON>[] | readonly (string | IDrawingModel<DrawingJSON> | Partial<{
            addListener: string | ((listener) => RemoveListener) | Partial<{}>;
            isAnchoredItem: string | true;
            isDrawing: string | true;
            moveBackward: string | (() => void) | Partial<{}>;
            moveForward: string | (() => void) | Partial<{}>;
            moveToBack: string | (() => void) | Partial<{}>;
            moveToFront: string | (() => void) | Partial<{}>;
            type: string;
            uuid: string;
            zIndex: string | number;
            close: any;
            copyTo?: any;
            delete: any;
            getAnchor: any;
            getAnchorType?: any;
            getBounds: any;
            getDescription: any;
            getName: any;
            getRotation: any;
            isClosed: any;
            isHidden: any;
            isLockAspectRatio: any;
            isProtected: any;
            setAnchorType?: any;
            setBounds: any;
            setDescription: any;
            setHidden: any;
            setLockAspectRatio: any;
            setName: any;
            setRotation: any;
            toJSON?: any;
        }>)[];
        freezePanes: string | FreezePanes | Partial<{
            coords?: string | Partial<CellCoords> | Partial<{
                colIndex?: string | number;
                rowIndex?: string | number;
            }>;
            topLeft?: string | Partial<TopLeft> | Partial<{
                left?: string | number;
                top?: string | number;
            }>;
        }>;
        gridLineColor: string | AdjustedColor | Partial<{
            val: string;
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }>;
        rowHeaderStyle: string;
        selection: string | CellSelection | Partial<{
            activeCoords?: string | CellCoords | Partial<{
                colIndex: string | number;
                rowIndex: string | number;
            }>;
            activeRangeIndex?: string | number;
            ranges?: string | CellRangeCoords[] | (string | CellRangeCoords | Partial<{
                colEnd: (...) | (...);
                colStart: (...) | (...);
                rowEnd: (...) | (...);
                rowStart: (...) | (...);
            }>)[];
        }>;
        showColumnGridlines: string | Partial<boolean>;
        showColumnHeaders: string | Partial<boolean>;
        showFormulas: string | Partial<boolean>;
        showRowGridlines: string | Partial<boolean>;
        showRowHeaders: string | Partial<boolean>;
        showZeros: string | Partial<boolean>;
        topLeft: string | TopLeft | Partial<{
            left: string | number;
            top: string | number;
        }>;
        zoomScale: string | number;
        addEventListener: any;
        selectDrawing: any;
        unselectDrawing: any;
    }>;
}

Properties

comments?: any
data?: CellsRow[]
merged?: string[]
protectedRanges?: Partial<{
    name: string;
    range: string | CellRangeCoords | Partial<{
        colEnd: string | number;
        colStart: string | number;
        rowEnd: string | number;
        rowStart: string | number;
    }>;
    verifier?: string | ModificationVerifier | Partial<{
        algorithmName?: string;
        hashValue: string;
        saltValue?: string;
        spinCount?: string | number;
    }>;
}>[]
protection?: Partial<{
    autoFilter: string | Partial<boolean>;
    deleteColumns: string | Partial<boolean>;
    deleteRows: string | Partial<boolean>;
    formatCells: string | Partial<boolean>;
    formatColumns: string | Partial<boolean>;
    formatRows: string | Partial<boolean>;
    insertColumns: string | Partial<boolean>;
    insertHyperlinks: string | Partial<boolean>;
    insertRows: string | Partial<boolean>;
    objects: string | Partial<boolean>;
    pivotTables: string | Partial<boolean>;
    scenarios: string | Partial<boolean>;
    selectLockedCells: string | Partial<boolean>;
    selectUnlockedCells: string | Partial<boolean>;
    sheet: string | Partial<boolean>;
    sort: string | Partial<boolean>;
    verifier: string | ModificationVerifier | Partial<{
        algorithmName?: string;
        hashValue: string;
        saltValue?: string;
        spinCount?: string | number;
    }>;
}>

Type declaration

  • autoFilter: string | Partial<boolean>
  • deleteColumns: string | Partial<boolean>
  • deleteRows: string | Partial<boolean>
  • formatCells: string | Partial<boolean>
  • formatColumns: string | Partial<boolean>
  • formatRows: string | Partial<boolean>
  • insertColumns: string | Partial<boolean>
  • insertHyperlinks: string | Partial<boolean>
  • insertRows: string | Partial<boolean>
  • objects: string | Partial<boolean>
  • pivotTables: string | Partial<boolean>
  • scenarios: string | Partial<boolean>
  • selectLockedCells: string | Partial<boolean>
  • selectUnlockedCells: string | Partial<boolean>
  • sheet: string | Partial<boolean>
  • sort: string | Partial<boolean>
  • verifier: string | ModificationVerifier | Partial<{
        algorithmName?: string;
        hashValue: string;
        saltValue?: string;
        spinCount?: string | number;
    }>

    If this is specified then a password will be requested to unlock

resources?: SharedResourceJSON[]
rows?: RowHeaderJSON[]
tabColor?: Partial<{
    val: string;
    adjustments: any;
    asCSS: any;
    isEqual: any;
    isImmutable: any;
    toHSLA: any;
    toHex: any;
    toJSON: any;
    toRGBA: any;
    toString: any;
}>

Type declaration

  • val: string
tables?: Partial<{
    autoFilter?: string | AutoFilter | Partial<{
        filterColumns?: any;
        ref?: string;
        sortState?: any;
    }>;
    columns?: string | TableColumn[] | (string | TableColumn | Partial<{
        name: string;
    }>)[];
    displayName?: string;
    headerRowCount?: string | number;
    name: string;
    ref: string | CellRangeCoords | Partial<{
        colEnd: string | number;
        colStart: string | number;
        rowEnd: string | number;
        rowStart: string | number;
    }>;
    sortState?: any;
    styleInfo?: string | TableStyleInfo | Partial<{
        name: string;
        showColumnStripes?: string | Partial<boolean>;
        showFirstColumn?: string | Partial<boolean>;
        showLastColumn?: string | Partial<boolean>;
        showRowStripes?: string | Partial<boolean>;
    }>;
    totalsRowCount?: string | number;
}>[]
threadedComments?: any
view?: Partial<{
    columnHeaderStyle: string;
    drawingSelection: string | readonly IDrawingModel<DrawingJSON>[] | readonly (string | IDrawingModel<DrawingJSON> | Partial<{
        addListener: string | ((listener) => RemoveListener) | Partial<{}>;
        isAnchoredItem: string | true;
        isDrawing: string | true;
        moveBackward: string | (() => void) | Partial<{}>;
        moveForward: string | (() => void) | Partial<{}>;
        moveToBack: string | (() => void) | Partial<{}>;
        moveToFront: string | (() => void) | Partial<{}>;
        type: string;
        uuid: string;
        zIndex: string | number;
        close: any;
        copyTo?: any;
        delete: any;
        getAnchor: any;
        getAnchorType?: any;
        getBounds: any;
        getDescription: any;
        getName: any;
        getRotation: any;
        isClosed: any;
        isHidden: any;
        isLockAspectRatio: any;
        isProtected: any;
        setAnchorType?: any;
        setBounds: any;
        setDescription: any;
        setHidden: any;
        setLockAspectRatio: any;
        setName: any;
        setRotation: any;
        toJSON?: any;
    }>)[];
    freezePanes: string | FreezePanes | Partial<{
        coords?: string | Partial<CellCoords> | Partial<{
            colIndex?: string | number;
            rowIndex?: string | number;
        }>;
        topLeft?: string | Partial<TopLeft> | Partial<{
            left?: string | number;
            top?: string | number;
        }>;
    }>;
    gridLineColor: string | AdjustedColor | Partial<{
        val: string;
        adjustments: any;
        asCSS: any;
        isEqual: any;
        isImmutable: any;
        toHSLA: any;
        toHex: any;
        toJSON: any;
        toRGBA: any;
        toString: any;
    }>;
    rowHeaderStyle: string;
    selection: string | CellSelection | Partial<{
        activeCoords?: string | CellCoords | Partial<{
            colIndex: string | number;
            rowIndex: string | number;
        }>;
        activeRangeIndex?: string | number;
        ranges?: string | CellRangeCoords[] | (string | CellRangeCoords | Partial<{
            colEnd: (...) | (...);
            colStart: (...) | (...);
            rowEnd: (...) | (...);
            rowStart: (...) | (...);
        }>)[];
    }>;
    showColumnGridlines: string | Partial<boolean>;
    showColumnHeaders: string | Partial<boolean>;
    showFormulas: string | Partial<boolean>;
    showRowGridlines: string | Partial<boolean>;
    showRowHeaders: string | Partial<boolean>;
    showZeros: string | Partial<boolean>;
    topLeft: string | TopLeft | Partial<{
        left: string | number;
        top: string | number;
    }>;
    zoomScale: string | number;
    addEventListener: any;
    selectDrawing: any;
    unselectDrawing: any;
}>

Type declaration

  • columnHeaderStyle: string

    Style of displaying default row header column Note - This does not affect how formulas are resolved

    Default Value

    HeaderTextStyle.One
    // TODO - allow a function callback (but this won't be persisted)
  • drawingSelection: string | readonly IDrawingModel<DrawingJSON>[] | readonly (string | IDrawingModel<DrawingJSON> | Partial<{
        addListener: string | ((listener) => RemoveListener) | Partial<{}>;
        isAnchoredItem: string | true;
        isDrawing: string | true;
        moveBackward: string | (() => void) | Partial<{}>;
        moveForward: string | (() => void) | Partial<{}>;
        moveToBack: string | (() => void) | Partial<{}>;
        moveToFront: string | (() => void) | Partial<{}>;
        type: string;
        uuid: string;
        zIndex: string | number;
        close: any;
        copyTo?: any;
        delete: any;
        getAnchor: any;
        getAnchorType?: any;
        getBounds: any;
        getDescription: any;
        getName: any;
        getRotation: any;
        isClosed: any;
        isHidden: any;
        isLockAspectRatio: any;
        isProtected: any;
        setAnchorType?: any;
        setBounds: any;
        setDescription: any;
        setHidden: any;
        setLockAspectRatio: any;
        setName: any;
        setRotation: any;
        toJSON?: any;
    }>)[]

    The drawing selection

  • freezePanes: string | FreezePanes | Partial<{
        coords?: string | Partial<CellCoords> | Partial<{
            colIndex?: string | number;
            rowIndex?: string | number;
        }>;
        topLeft?: string | Partial<TopLeft> | Partial<{
            left?: string | number;
            top?: string | number;
        }>;
    }>

    The freeze panes.

  • gridLineColor: string | AdjustedColor | Partial<{
        val: string;
        adjustments: any;
        asCSS: any;
        isEqual: any;
        isImmutable: any;
        toHSLA: any;
        toHex: any;
        toJSON: any;
        toRGBA: any;
        toString: any;
    }>

    The color of the gridline on the sheet.

    Default Value

    null (adopts the app theme color)
    

    Remarks

    gridLine color is a sheet view attribute but in Excel is a workbook attribute. If null then use the app theme

  • rowHeaderStyle: string

    Style of displaying default row header text Note - This does not affect how formulas are resolved

    Default Value

    HeaderTextStyle.A1
    // TODO - allow a function callback (but this won't be persisted)
  • selection: string | CellSelection | Partial<{
        activeCoords?: string | CellCoords | Partial<{
            colIndex: string | number;
            rowIndex: string | number;
        }>;
        activeRangeIndex?: string | number;
        ranges?: string | CellRangeCoords[] | (string | CellRangeCoords | Partial<{
            colEnd: (...) | (...);
            colStart: (...) | (...);
            rowEnd: (...) | (...);
            rowStart: (...) | (...);
        }>)[];
    }>

    The current cell selection for the sheet.

  • showColumnGridlines: string | Partial<boolean>

    Show/Hide column gridlines.

    Default Value

    true;
    
  • showColumnHeaders: string | Partial<boolean>

    Show/Hide columns headers.

    Default Value

    true;
    
  • showFormulas: string | Partial<boolean>

    Indicate if view is showing formulas or values

    Default Value

    false
    
  • showRowGridlines: string | Partial<boolean>

    Show/Hide row gridlines.

    Default Value

    true;
    
  • showRowHeaders: string | Partial<boolean>

    Show/Hide row headers.

    Default Value

    true;
    
  • showZeros: string | Partial<boolean>

    Indicate whether the sheet should show 0 (zero) or blanks in cells containing zero values.

    Default Value

    true
    

    Remarks

    When false, cells with zero value appear blank instead of showing the number zero.

  • topLeft: string | TopLeft | Partial<{
        left: string | number;
        top: string | number;
    }>

    The default top left corner accounting for scrolling.

  • zoomScale: string | number

    Zoom. This is expressed as a percentage. Values can be between 10 (10%) or 400 (400%)

    Default Value

    100
    // TODO - support zoomScaleNormal, zoomScalePageLayout, zoomScaleSheetLayoutView,