Skip to content
Sheetwrite

@sheetwrite/core

FormulaSheetReadsinterface

Report a problem

On this page

What a suggester can read of the workbook while a formula is edited. Rows and columns are zero-based data positions, the positions formula references name.

Members

Methods

workbook(): Workbook;

The workbook's sheets, defined names and tables.

formula(sheet: SheetId, row: number, col: number): string | null;

The formula of a cell as written, with its leading =; null when the cell holds no formula.

value(sheet: SheetId, row: number, col: number): CellScalar;

The value a cell shows: a formula's result, or the value typed in it.

edge(sheet: SheetId, row: number, col: number, dRow: number, dCol: number): number;

Where Ctrl+Arrow lands from a cell. It is the row (for dRow) or column (for dCol) at the edge of the block of filled cells. One of dRow and dCol is -1 or 1, the other 0.

translate(source: string, dRow: number, dCol: number): string;

source copied dRow rows and dCol columns away: its relative references move, as a fill or paste moves them.

Declaration

View full TypeScript declaration
export interface FormulaSheetReads {
workbook(): Workbook;
formula(sheet: SheetId, row: number, col: number): string | null;
value(sheet: SheetId, row: number, col: number): CellScalar;
edge(
sheet: SheetId,
row: number,
col: number,
dRow: number,
dCol: number,
): number;
translate(source: string, dRow: number, dCol: number): string;
}

Referenced by

Public exports naming FormulaSheetReads