Interface ISheetView

View settings for a single sheet. Sheets Views in Excel have sheetViews and CustomSheetViews

TODO/Note - Excel has lots of SheetViews concepts. It seems to be due to evolution SheetView - Supports an unnamed list but only the first view seems to be used. This has embedded panes

customWorkbookViews/customSheetViews - Names for SheetViews is managed as the customWorkbookViews level but creates a point via guid to customSheetViews. These are subclasses of sheetView that add hiddenColumns/hiddenRows and filters And ExcelOnline views (365 SheetViews)

Note - We allow a sheet to contain one ISheetModel. All remaining sheetViews must be managed somewhere else. We allow Workbooks to manage sheetViews

interface ISheetView {
    columnHeaderStyle: HeaderTextStyle;
    drawingSelection: readonly IDrawingModel<DrawingJSON>[];
    freezePanes: FreezePanes;
    gridLineColor: AdjustedColor;
    rowHeaderStyle: HeaderTextStyle;
    selection: CellSelection;
    showColumnGridlines: boolean;
    showColumnHeaders: boolean;
    showFormulas: boolean;
    showRowGridlines: boolean;
    showRowHeaders: boolean;
    showZeros: boolean;
    topLeft: TopLeft;
    zoomScale: number;
    addEventListener(type, listener, options?): RemoveListener;
    selectDrawing(drawing, addToSelection?): void;
    unselectDrawing(drawing): void;
}

Hierarchy (view full)

Properties

columnHeaderStyle: HeaderTextStyle

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: readonly IDrawingModel<DrawingJSON>[]

The drawing selection

freezePanes: FreezePanes

The freeze panes.

gridLineColor: AdjustedColor

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: HeaderTextStyle

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: CellSelection

The current cell selection for the sheet.

showColumnGridlines: boolean

Show/Hide column gridlines.

Default Value

true;
showColumnHeaders: boolean

Show/Hide columns headers.

Default Value

true;
showFormulas: boolean

Indicate if view is showing formulas or values

Default Value

false
showRowGridlines: boolean

Show/Hide row gridlines.

Default Value

true;
showRowHeaders: boolean

Show/Hide row headers.

Default Value

true;
showZeros: 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: TopLeft

The default top left corner accounting for scrolling.

zoomScale: 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,

Methods