SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function toArgRows

    • Expand a function's declared parameters into the concrete rows of an argument form, GROWN to fit what has been filled in so far.

      A plain parameter is one row. A rest parameter or a repeating group (SUMIFS's range/criteria pair) is emitted a whole repetition at a time, with one spare repetition always waiting past the last one the user has touched — Excel's behavior: SUM opens on number1 + number2, and typing into number2 is what makes number3 appear.

      Parameters

      • params: readonly IParameterType[]

        The callee's declared parameters, in order.

      • filled: readonly string[] = []

        The per-row texts the form currently holds (index-aligned with the returned rows), shorter or absent when nothing has been typed.

      Returns ArgRow[]

      Growth is driven by the LAST filled row rather than by a count of the non-empty ones: a blank in the middle is a legal argument (=IF(A1,,B1)), so ['A1', '', 'A3'] must keep three rows plus the spare, not shrink back to two and drop what the user typed.

      A declaration may also carry parameters AFTER the group (SWITCH's default). Those rows follow the repetitions, and are excluded from the scan that grows them — otherwise filling the trailing one would keep adding repetitions in front of itself. The one case that stays ambiguous is a group whose final repetition AND suffix are both filled: a flat, positional text array cannot say which of the two a value belongs to once the rows in between move. No declaration in the catalog has that shape today (every repeating group is the last parameter).