sheets_compare_ranges
Compare cell formatting between two ranges with identical dimensions, returning only the cells and properties that differ. Useful for verifying formatting consistency across repeated patterns.
Instructions
Compare cell formatting between two ranges of identical dimensions. Useful for verifying repeated patterns, e.g. "do all data rows 6–85 have identical formatting?" or "is row 10 formatted identically to the template row 5?". Returns a diff listing only the cells and properties that differ between the two ranges. Cells are compared position-by-position; rangeA and rangeB must have the same number of rows and columns. Use fields to restrict comparison to specific format properties.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Optional list of format property names to compare, e.g. ["backgroundColor", "textFormat"]. All format properties compared if omitted. | |
| rangeA | Yes | First range with sheet prefix, e.g. "Sheet1!A6:Z6" | |
| rangeB | Yes | Second range with sheet prefix, e.g. "Sheet1!A7:Z7" | |
| spreadsheetId | Yes | The ID of the spreadsheet (found in the URL after /d/) | |
| useEffectiveFormat | No | Default: false. Compare effectiveFormat (true) or userEnteredFormat (false). effectiveFormat includes conditional formatting overlays. |