Updates the value of a cell. :param int row: Row number. :param int col: Column number. :param value: New value. Example:: worksheet.update_cell(1, 1, '42')
(
self, row: int, col: int, value: Union[int, float, str]
)
| 743 | return self.update_cell(*(a1_to_rowcol(label)), value=value) |
| 744 | |
| 745 | def update_cell( |
| 746 | self, row: int, col: int, value: Union[int, float, str] |
| 747 | ) -> JSONResponse: |
| 748 | """Updates the value of a cell. |
| 749 | |
| 750 | :param int row: Row number. |
| 751 | :param int col: Column number. |
| 752 | :param value: New value. |
| 753 | |
| 754 | Example:: |
| 755 | |
| 756 | worksheet.update_cell(1, 1, '42') |
| 757 | """ |
| 758 | range_name = absolute_range_name(self.title, rowcol_to_a1(row, col)) |
| 759 | |
| 760 | data = self.client.values_update( |
| 761 | self.spreadsheet_id, |
| 762 | range_name, |
| 763 | params={"valueInputOption": ValueInputOption.user_entered}, |
| 764 | body={"values": [[value]]}, |
| 765 | ) |
| 766 | |
| 767 | return data |
| 768 | |
| 769 | def update_cells( |
| 770 | self, |