Skip to content
Sheetwrite

@sheetwrite/core/codec

rangeA1function

Report a problem

On this page

Plumbing for Sheetwrite's own codecs, such as @sheetwrite/xlsx. An internal entry point: no compatibility promise, not for applications.

It re-exports the values a codec needs from the modules that define them, so loading a codec does not load the grid and the rest of the main entry point. Two cell corners → A1 range ("A1:B3"), collapsing to a single ref when equal.

Declaration

function rangeA1(a: CellRef, b: CellRef): string

Parameters

a: CellRefrequired

One corner cell, zero-based.

b: CellRefrequired

The opposite corner cell, zero-based; the corners can come in any order.

Returns

string

The A1 range, top-left first.