sheets_get_full_sheet_snapshot
Fetches full sheet snapshot in a single API call: frozen rows, merged cells, column widths, row heights, banded ranges, conditional formatting, and optional cell formatting. Use for programmatic sheet recreation.
Instructions
One-shot tool: reads all structural and formatting metadata for a sheet in a single API call. Returns: sheet properties (frozen rows/cols, dimensions, tab color), merged cells, column widths, row heights, banded ranges, and optionally cell-level formatting for a specified range (includeFormattingRange). compactMode is OFF by default — full per-cell detail is returned unless compactMode:true is provided. When compactMode is ON, adjacent cells with identical formatting are collapsed into range descriptors (90%+ smaller output). Conditional formatting rules are included by default (includeConditionalFormatting:true); set to false to exclude them. CF formulas are normalized to English locale (commas). Use fields to limit which format properties are returned. Use this before programmatically recreating a sheet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Optional list of format field names to include, e.g. ["backgroundColor", "textFormat", "borders"]. Reduces response size by excluding unused format properties. All fields returned if omitted. | |
| sheetName | Yes | Name of the sheet (tab) to snapshot | |
| compactMode | No | Default: false. Full per-cell formatting is returned unless compactMode:true is set. When true, adjacent cells with identical formatting are collapsed into range descriptors (run-length encoded), reducing output by 90%+ for typical formatted sheets. Only applies when includeFormattingRange is set. | |
| spreadsheetId | Yes | The ID of the spreadsheet (found in the URL after /d/) | |
| useEffectiveFormat | No | If includeFormattingRange is set: use effectiveFormat (true) or userEnteredFormat (false, default). | |
| includeFormattingRange | No | Optional range WITHOUT sheet prefix (e.g. "A1:Z85") to include cell-level formatting. If omitted, only structural metadata is returned. | |
| includeConditionalFormatting | No | Default: true. Include conditional formatting rules and banded ranges in the snapshot. CF formulas are normalized to English locale (semicolons → commas). Set to false to reduce output size when CF rules are not needed. |