Google Sheets tool utils.
Get credentials.
Import googleapiclient.discovery.build function.
Build a Google Sheets service with OAuth2 credentials (full access).
Build a Google Sheets service with API key (read-only access).
Validate and normalize a Google Spreadsheet ID.
Validate A1 notation range format.
Supports:
'A1', 'Z99''A1:B2''A:A', 'B:D''1:1', '5:10''Sheet1!A1', "'My Sheet'!A1:B2"'MyData', 'Sales_2024'Validate and normalize a range name.
Permissive A1 validator. Supports:
'A1', 'Z99''A1:B2''A:A', 'B:D''1:1', '5:10''Sheet1!A1', "'My Sheet'!A1:B2"'MyData', 'Sales_2024'