Skip to content

decodeCell

On this page

Decode an A1-style cell reference to a numeric {c, r} address (zero-based).

Hand-optimized parser that processes characters by charCode for performance: digits (48-57) accumulate into the row, uppercase letters (65-90) into the column.

decodeCell(cstr: string): CellAddress

Parameters

NameTypeRequiredDescription
cstrstringYesCell reference string (e.g. "A1", "AB12")

Returns

CellAddress

Zero-based cell address {c: column, r: row}