Google Spreadsheets Python API v4
76
Populate individual spreadsheet cells with values, formulas, and annotations while preserving formatting intent.
@generates
def apply_cell_annotations(client, spreadsheet_id: str, assignments: list[dict]) -> None:
"""
Apply targeted updates to cells within the first worksheet of the spreadsheet.
Parameters:
client: An authenticated spreadsheet client from the dependency.
spreadsheet_id: Identifier of the spreadsheet to modify.
assignments: Items with:
- address (str): A1-style cell label.
- value (str|int|float|None): Literal value when no formula is provided.
- formula (str|None): Formula string to store instead of a literal value.
- note (str|None): Optional cell note to attach.
- number_format (str|None): Named number format to apply for numeric values.
- background (tuple[float, float, float]|None): RGB tuple for the cell background.
The function must ensure value/format/note changes are persisted before returning.
"""Used to open spreadsheets and manipulate individual cells. @satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-pygsheetsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10