Skip to content
Agent Tools

fillCells

Extend a selection by filling cells with auto-detected patterns (numbers, dates, formulas). Similar to Excel’s fill handle - detects sequences and continues them. Fill direction is inferred from selection and extend_to: the dimension that changes determines the fill axis.

IMPORTANT: After filling, you MUST call editCellStyles to apply formatting to the filled cells.

Examples:

  • Fill down: { “sheet”: “Sheet1”, “selection”: “A1:A3”, “extend_to”: “A1:A10”, “note”: “Extend series” }
  • Fill right: { “sheet”: “Sheet1”, “selection”: “A1:C1”, “extend_to”: “A1:F1”, “note”: “Extend headers” }
  • Fill up: { “sheet”: “Sheet1”, “selection”: “A8:B10”, “extend_to”: “A1:B10”, “note”: “Extend upward” }
ParameterTypeDescription
sheetstringrequiredSheet name to operate on
selectionstringrequiredSource range containing the pattern (e.g., “A1:A3”)
extend_tostringrequiredTarget range to fill to (e.g., “A1:A10”)
notestringrequiredDescription of this operation for version history