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” }
| Parameter | Type | Description | |
|---|---|---|---|
sheet | string | required | Sheet name to operate on |
selection | string | required | Source range containing the pattern (e.g., “A1:A3”) |
extend_to | string | required | Target range to fill to (e.g., “A1:A10”) |
note | string | required | Description of this operation for version history |