← All packages

@searsuite/sear-foundation-range

Range primitives and normalization helpers used by Sheet and Doc domains.

classRange

Parses and represents an Excel-style rectangular range.

The public coordinates are one-based because the string format is A1-based, while column conversion delegates to the shared zero-based label utilities.

constructorRange(range: string): Range

Constructs a range from an A1-style string.

range

Range string in the form A1:B2.

memberrange
range: unknown
membershape
shape: unknown
methodcontains(x: number, y: number): boolean

Tests whether a one-based coordinate is inside this range.

ReturnsTrue when the coordinate falls inside the range.

x

One-based column coordinate.

y

One-based row coordinate.

methodtoString(): string

Serializes the range back to A1 notation.

methodcolumnToNumber(column: string): numberstatic

Converts an Excel-style column label to a one-based column number.

ReturnsOne-based column number.

column

Column label such as A or AA.

methodnumberToColumn(number: number): stringstatic

Converts a one-based column number to an Excel-style label.

ReturnsColumn label such as A or AA.

number

One-based column number.