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

    Interface ISheetView

    The ISheetView provides properties and methods for controlling how a sheet is displayed and interacted with, without affecting the underlying data itself.

    View settings include aspects like frozen panes, zoom level, selection, gridlines visibility, and whether formulas are displayed. but do not affect the underlying data itself.

    • Since views only affect the presentation of the data, changes to view settings are typically not included in the undo/redo stack.
    • Multiple views can be associated to the same collection of data, each providing a different way of viewing and interacting.
    interface ISheetView {
        isISheetView: true;
        addListeners(
            listeners: ISheetView.IListeners,
            options?: IListener.Options,
        ): Remove;
        getColumnHeaderStyle(): ISheetView.HeaderTextStyle;
        getColumnHeaderTableNames(): ISheetView.ColumnHeaderTableNames;
        getFreezePanes(): FreezePanes;
        getGridLineColor(): any;
        getId(): string;
        getMovableSelection(): readonly IMovable[];
        getNextZoomScale(zoomIn: boolean, amount?: number): number;
        getRangeSelection(): IRangeSelection;
        getRowHeaderStyle(): ISheetView.HeaderTextStyle;
        getTopLeft(): TopLeft;
        getTopLeftCell(): CellCoords;
        getZoomScale(): number;
        isRightToLeft(): boolean;
        isShowColumnGridlines(): boolean;
        isShowColumnHeaders(): boolean;
        isShowFormulas(): boolean;
        isShowInvalid(): boolean;
        isShowLockedShading(): boolean;
        isShowOutlineSymbols(): boolean;
        isShowRowGridlines(): boolean;
        isShowRowHeaders(): boolean;
        isShowZeros(): boolean;
        selectMovables(
            movables: readonly IMovable[],
            addToSelection?: boolean,
        ): this;
        setColumnHeaderStyle(columnHeaderStyle: ISheetView.HeaderTextStyle): this;
        setColumnHeaderTableNames(
            tableNames: ISheetView.ColumnHeaderTableNames,
        ): this;
        setFreezePanes(freezePanes: FreezePanes): this;
        setGridLineColor(gridLineColor: any): this;
        setRightToLeft(rightToLeft: boolean): this;
        setRowHeaderStyle(rowHeaderStyle: ISheetView.HeaderTextStyle): this;
        setShowColumnGridlines(showColumnGridlines: boolean): this;
        setShowColumnHeaders(showColumnHeaders: boolean): this;
        setShowFormulas(showFormulas: boolean): this;
        setShowInvalid(showInvalid: boolean): this;
        setShowLockedShading(showLockedShading: boolean): this;
        setShowOutlineSymbols(showOutlineSymbols: boolean): this;
        setShowRowGridlines(showRowGridlines: boolean): this;
        setShowRowHeaders(showRowHeaders: boolean): this;
        setShowZeros(showZeros: boolean): this;
        setTopLeft(topLeft: Partial<TopLeft> | null): this;
        setZoomScale(zoomScale: number): this;
        toJSON(): ISheetView.JSON | null;
        unselectMovables(movables: readonly IMovable[]): this;
        update(properties: Partial<ISheetView.Properties>): this;
        zoomIn(): this;
        zoomOut(): this;
    }

    Hierarchy (View Summary)

    Index
    isISheetView: true

    For runtime type checking.

    • Identifies this view.

      Returns string

      Stable for the life of the view. A sheet can be shown through more than one view — each user in a shared workbook has their own — so anything recorded against a view (a restored selection, for example) names it by this id rather than holding the view itself.

    • Return the next zoom scale based on current zoom.

      Parameters

      • zoomIn: boolean

        A flag to indicate if zooming in true or out false.

      • Optionalamount: number

        The amount to zoom by. If not provided the default steps will be used.

      Returns number

    • Returns TopLeft

    • The first VISIBLE cell — the cell sitting at the grid's top-left corner right now. A1 when un-scrolled.

      Returns CellCoords

      The cell-coordinate reading of getTopLeft (which is base px), resolved against the row / column headers. Freeze-aware per axis: a frozen band is what actually occupies the corner, so on a frozen axis the FROZEN pane's own scroll (ISheetView.FreezePanes.topLeft) answers — normally leaving that axis at the sheet's start — while an unfrozen axis reads the main scroll. This is the same split the xlsx writer emits as sheetView@topLeftCell / pane@topLeftCell.

      Note this is the view's own scroll state, not a rendered measurement; a renderer mid-animation may briefly show something else.

    • Add a movable to the selection. If addToSelection is true then the items will be added to the selection.

      Parameters

      • movables: readonly IMovable[]

        The movables to select.

      • OptionaladdToSelection: boolean

      Returns this

    • The freeze panes.

      Parameters

      Returns this

    • The color of the gridline on the sheet.

      Parameters

      • gridLineColor: any

      Returns this

      null (adopts the app theme color)

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

    • Indicate whether the sheet is displayed right-to-left (the leftmost column on the right). Persisted per sheet; round-trips through xlsx sheetView@rightToLeft.

      Parameters

      • rightToLeft: boolean

      Returns this

      false

    • Show/Hide column gridlines.

      Parameters

      • showColumnGridlines: boolean

      Returns this

      true

    • Show/Hide columns headers.

      Parameters

      • showColumnHeaders: boolean

      Returns this

      true

    • Indicate if view is showing formulas or values

      Parameters

      • showFormulas: boolean

      Returns this

      false

    • Indicate whether cells whose value fails a data validation are marked.

      Parameters

      • showInvalid: boolean

      Returns this

      false

      The sheet's counterpart of Excel's Circle Invalid Data, except that the marks follow the values as they change. A cell is marked when its value fails any data validation covering it; a list cell is marked only when its value is not on the list. Not written to xlsx, where Excel keeps no such setting.

    • Indicate whether the cells that sheet protection locks are shaded, leaving the ranges that stay editable clear.

      Parameters

      • showLockedShading: boolean

      Returns this

      false

      Only meaningful while the sheet is protected: it shades what protection is actually holding shut, so an unprotected sheet has nothing to shade.

    • Indicate whether the outline symbols (the brackets, the collapse and expand buttons and the level buttons of the row and column groups) are shown.

      Parameters

      • showOutlineSymbols: boolean

      Returns this

      true

      A view setting, as in Excel (Window.DisplayOutline, Ctrl+8): the groups stay on the sheet, only their symbols are hidden. Round-trips through xlsx sheetView@showOutlineSymbols.

    • Show/Hide row gridlines.

      Parameters

      • showRowGridlines: boolean

      Returns this

      true

    • Show/Hide row headers.

      Parameters

      • showRowHeaders: boolean

      Returns this

      true

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

      Parameters

      • showZeros: boolean

      Returns this

      true

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

    • The top left scroll position of the (main) pane.

      Parameters

      • topLeft: Partial<TopLeft> | null

      Returns this

      Expressed in zoom-independent (base, unzoomed) px. Screen/scroll position is derived as base * zoomScale at the rendering boundary, so this value is stable across zoom changes.

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

      Parameters

      • zoomScale: number

      Returns this

      100

    • Zoom in the view.

      Returns this

    • Zoom out the view.

      Returns this