format_sheet_range
Apply formatting to Google Sheets ranges by setting background/text colors and number/date formats using hex codes and Sheets format types.
Instructions
Applies formatting to a range: background/text color and number/date formats.
Colors accept hex strings (#RRGGBB). Number formats follow Sheets types (e.g., NUMBER, NUMBER_WITH_GROUPING, CURRENCY, DATE, TIME, DATE_TIME, PERCENT, TEXT, SCIENTIFIC). If no sheet name is provided, the first sheet is used.
Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (str): A1-style range (optionally with sheet name). Required. background_color (Optional[str]): Hex background color (e.g., "#FFEECC"). text_color (Optional[str]): Hex text color (e.g., "#000000"). number_format_type (Optional[str]): Sheets number format type (e.g., "DATE"). number_format_pattern (Optional[str]): Optional custom pattern for the number format.
Returns: str: Confirmation of the applied formatting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | ||
| spreadsheet_id | Yes | ||
| range_name | Yes | ||
| background_color | No | ||
| text_color | No | ||
| number_format_type | No | ||
| number_format_pattern | No |