Expand description
Cell and range addresses.
Internally rows and columns are 0-based (A1 = row 0, col 0). The sheet is 1,048,576 rows by
16,384 columns (XFD1048576), like Excel.
Structs§
- Category
Levels - The shape of a chart’s category range beside its values: a plain list, or a multi-level axis (Excel: a category range two or more columns wide beside a column of values is a two-level axis, year beside month; one two or more rows tall above a row of values likewise).
- CellRef
- A cell position (0-based).
- Range
Ref - A rectangular block of cells, inclusive on both ends. Always normalised (
start <= end).
Constants§
Functions§
- category_
levels - How
categorieslays its labels out besidevalues(Nonewhen the values aren’t a reference: the categories’ own shape decides).Nonefor a plain list of labels. - col_
to_ letters - 0 →
A, 25 →Z, 26 →AA, 16383 →XFD. - letters_
to_ col A→ 0,xfd→ 16383.Nonefor empty, non-letters or beyondXFD.- parse_
a1_ prefix - Parses an A1 reference at the start of
s:(col, row, col_abs, row_abs, rest). - quote_
sheet - A sheet name as it is written in a reference: quoted, with
'doubled, when Excel quotes it. - sheet_
needs_ quotes - Whether Excel quotes a sheet name in a reference (
'My Sheet'!A1): it starts with a digit or., holds anything but letters (any script), digits,_and., reads as an A1 cell within the sheet or as an R1C1 reference, or is a boolean. - split_
areas - The areas of a reference list, split at the commas between them. A comma inside a quoted
sheet name (
'Sales, West'!A1) is part of the name, and a doubled quote inside the quotes ('O''Brien, Jr'!A1) is an escaped quote, not the end of the name: a quote toggles the quoted state, so a doubled one toggles it twice. - split_
sheet 'My Sheet'!A1→ (Some("My Sheet"),A1). Splits at the last!, so a quoted name may hold one ('a!b'!A1).- unquote_
sheet - The inverse of
quote_sheet: takes the quotes off a sheet name and reads''as'. Text that isn’t quoted is returned as it is.