TX Sheet Control

SpreadsheetOptions.zoom Property

Property

Initial worksheet display zoom percentage, from 25 through 400. Defaults to 100. Row height is configured separately.

Owner: SpreadsheetOptions. Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.

Syntax

zoom?: number | undefined

Supply a finite percentage between 25 and 400, inclusive. Fractional initial percentages are accepted.

Examples

Configure SpreadsheetOptions for an invoice or sales-report workflow. Supply font and document resources from the application where the example accepts them as inputs.

import type { SpreadsheetOptions } from '@txtextcontrol/tx-sheet-control';

const spreadsheetSettings: SpreadsheetOptions = {
    height: 'fill',
    locale: 'de-DE',
    fontCatalogURL: '/assets/sheet/fonts/catalog.json',
    zoom: 110,
};

console.log(spreadsheetSettings['zoom']);

Remarks

Construction raises RangeError when zoom is nonfinite or outside 25–400. Initial options are validated rather than clamped. Changing this options object after creating the editor does not change its current view; use the editor UI zoom property or setZoom instead.

Worksheet zoom affects the screen view independently of print scaling.

See Also