Skip to content
Sheetwrite

@sheetwrite/core/codec

labelToColfunction

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. A1 column label → 0-based column index (inverse of colToA1).

Declaration

function labelToCol(label: string): number

Parameters

label: stringrequired

Upper-case column letters, such as "AB"; lower case is not accepted.

Returns

number

The zero-based column index, such as 27 for "AB".