Format Sheet Range
format_sheet_rangeApplies formatting to a Google Sheets range, including colors, number formats, alignment, text styles, borders, merged cells, and dropdown lists.
Instructions
Applies formatting to a range: colors, number formats, text wrapping, alignment, text styling, cell merging/unmerging, borders, and dropdown lists.
Colors accept hex strings (#RRGGBB). Number formats follow Sheets types (e.g., NUMBER, CURRENCY, DATE, PERCENT). If no sheet name is provided, the first sheet is used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | Whether to apply bold formatting. | |
| italic | No | Whether to apply italic formatting. | |
| borders | No | Which borders to draw, comma-separated: all, outer, inner, top, bottom, left, right, inner_horizontal, inner_vertical (e.g., "outer" or "bottom,inner_horizontal"). "none" removes every border in the range. | |
| font_size | No | Font size in points. | |
| merge_type | No | MERGE_ALL (default), MERGE_COLUMNS, or MERGE_ROWS. Setting it implies merge_cells=True. | |
| range_name | Yes | A1-style range (optionally with sheet name). Required. | |
| text_color | No | Hex text color (e.g., "#000000"). | |
| merge_cells | No | True merges the range, False unmerges it. Merging keeps only the top-left value of each merged group. | |
| border_color | No | Hex border color (default black). Requires borders. | |
| border_style | No | SOLID (default), SOLID_MEDIUM, SOLID_THICK, DASHED, DOTTED, or DOUBLE. Requires borders. | |
| wrap_strategy | No | Text wrap strategy - WRAP (wrap text within cell), CLIP (clip text at cell boundary), or OVERFLOW_CELL (allow text to overflow into adjacent empty cells). | |
| clear_dropdown | No | Remove all data validation from the range: dropdowns, but also checkboxes and other validation rules. | |
| spreadsheet_id | Yes | The ID of the spreadsheet. Required. | |
| dropdown_strict | No | With dropdown_values: reject other input (default True) or only show a warning (False). | |
| dropdown_values | No | Turns every cell in the range into a dropdown offering these values (e.g., ["open", "done"]). | |
| background_color | No | Hex background color (e.g., "#FFEECC"). | |
| user_google_email | Yes | The user's Google email address. Required. | |
| number_format_type | No | Sheets number format type (e.g., "DATE"). | |
| vertical_alignment | No | Vertical text alignment - TOP, MIDDLE, or BOTTOM. | |
| horizontal_alignment | No | Horizontal text alignment - LEFT, CENTER, or RIGHT. | |
| number_format_pattern | No | Custom pattern for the number format. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |