ExVEx.Utils.Coordinate (ExVEx v0.2.0)

Copy Markdown View Source

A1-style cell coordinate parsing and emission.

Coordinates are represented internally as {row, col} 1-indexed tuples. Columns use Excel's bijective base-26: A..Z, AA..AZ, .., XFD.

Summary

Types

col()

@type col() :: pos_integer()

row()

@type row() :: pos_integer()

t()

@type t() :: {row(), col()}

Functions

column_label(n)

@spec column_label(col()) :: String.t()

column_number(letters)

@spec column_number(String.t()) :: col()

parse(binary)

@spec parse(String.t()) :: {:ok, t()} | :error

to_string(arg)

@spec to_string(t()) :: String.t()