Sheety::CroupierHelpers
Helper functions for generated spreadsheet binaries
These are included in the generated Crystal code to provide efficient cell value fetching operations.
Instance methods
bin_div(left, right) : String | Nil
Sourcebin_mul(left, right) : String | Nil
Sourcebin_pow(left, right) : String | Nil
Sourcebin_sub(left, right) : String | Nil
Sourcefetch_cell_range(sheet : String, start_col : String, start_row : Int32, end_col : String, end_row : Int32) : Array(String)
Fetch a range of cells (e.g., "Sheet1!A1:A100")
initialize_range(sheet : String, start_col : String, start_row : Int32, end_col : String, end_row : Int32) : Nil
Initialize all cells in a range to empty strings This is needed because Croupier requires all input keys to exist
range_inputs(sheet : String, start_col : String, start_row : Int32, end_col : String, end_row : Int32) : Array(String)
Generate k/v store input keys for a range
register_formula_task(id : String, inputs : Array(String), output : String, &block : -> String) : Nil
Register one formula task. This is a thin wrapper around Croupier::Task.new so that the generated source can register thousands of tasks from a single data-driven loop (one Task.new call site in the compiled program) instead of emitting a literal Task.new block per cell — which made the Crystal compiler run out of memory on large sheets.