Python helpers

clear_google_sheets_range

Clear values and formulas in a Google Sheet range, keeping its rows and formatting.

Requires Editor access for Octocom's Google account and a connected spreadsheet. See Google Sheets setup.

clear_google_sheets_range(sheet_id: str, range: str, sheet_name: str = None) -> dict

Clears values and formulas in a bounded A1 rectangle of at most 10,000 cells. Formatting, notes, validation and row positions stay as they are, so a sheet's layout survives for the next write. Returns success and range. It does not delete rows, insert rows or resize the tab. A timeout does not prove whether the write committed.

Example

clear_google_sheets_range("SHEET_ID", "A2:C100", sheet_name="Reports")

See Google Sheets helpers for access, limits, merged cells, cache freshness and safe recovery after failures.

On this page