Expand description
GridCraft worksheet function library.
Every function is described by a FnSpec (name, arity, category, which parameters take
scalars, a signature and a one-line description) and implemented as a plain Rust function over
already-evaluated arguments. The calculation engine looks functions up by name with
lookup and invokes them through call, which applies Excel’s automatic array lifting:
passing an array where a scalar is expected evaluates the function once per element.
Special forms that need references, laziness or hidden-row information (ROW, OFFSET,
INDIRECT, LET, LAMBDA, SUBTOTAL, AGGREGATE, TEXT…) are evaluated by the host; this crate
exports aggregate_values for SUBTOTAL/AGGREGATE.
Structs§
- Arg
- An evaluated argument. Ranges arrive as
Value::Array(blank cells =Value::Empty) withfrom_ref = true. - FnSpec
- Timeline
- A timeline’s step, for continuing it past its last point (the Forecast Sheet’s future rows).
Enums§
Traits§
- Ctx
- Services a function may need from the host.
Functions§
- aggregate_
values - Evaluates SUBTOTAL/AGGREGATE function
function_numover already-filtered cell values. - aggregate_
values_ k - AGGREGATE codes 14 = LARGE, 15 = SMALL, 16 = PERCENTILE.INC, 17 = QUARTILE.INC,
18 = PERCENTILE.EXC, 19 = QUARTILE.EXC with their
kargument; codes 1–13 delegate toaggregate_values. - all
- Every registered function.
- call
- Calls a function with array lifting applied. Wrong arity gives
#VALUE!. - lookup
- Looks a function up by name (case-insensitive;
_xlfn.- and_xlws.-free names). A_xludf.name is user-defined and never found.