MCPcopy
hub / github.com/burnash/gspread / delete_protected_range

Method delete_protected_range

gspread/worksheet.py:2117–2134  ·  view source on GitHub ↗

Delete protected range identified by the ID ``id``. To retrieve the ID of a protected range use the following method to list them all: :func:`~gspread.Spreadsheet.list_protected_ranges`

(self, id: str)

Source from the content-addressed store, hash-verified

2115 return self.client.batch_update(self.spreadsheet_id, body)
2116
2117 def delete_protected_range(self, id: str) -> JSONResponse:
2118 """Delete protected range identified by the ID ``id``.
2119
2120 To retrieve the ID of a protected range use the following method
2121 to list them all: :func:`~gspread.Spreadsheet.list_protected_ranges`
2122 """
2123
2124 body = {
2125 "requests": [
2126 {
2127 "deleteProtectedRange": {
2128 "protectedRangeId": id,
2129 }
2130 }
2131 ]
2132 }
2133
2134 return self.client.batch_update(self.spreadsheet_id, body)
2135
2136 def delete_dimension(
2137 self, dimension: Dimension, start_index: int, end_index: Optional[int] = None

Callers 1

Calls 1

batch_updateMethod · 0.45

Tested by 1