grapher.infer_dynamic_offset_targets()

Infer the union of all possible OFFSET targets for a formula.

Usage

Source

grapher.infer_dynamic_offset_targets(
    formula,
    *,
    current_sheet,
    cell_type_env,
    limits=None,
    bounds=None,
    named_ranges=None,
    named_range_ranges=None,
    current_row=None,
    current_col=None
)

This helper is intentionally focused and conservative: - Only OFFSET calls are analysed (INDIRECT is currently ignored). - Arguments may use a small Excel expression subset supported by core.expr_eval.evaluate_expr. - Leaf cells referenced by OFFSET/INDEX arguments must have a numeric domain in cell_type_env unless they appear only in ref_only argument positions (see excel_grapher.core.excel_function_meta). - Integer interval domains must be finite and small enough to enumerate.