I get an error when trying to use the worksheet.update.
I want it to update cell B2 and C2 but instead it gives this.
{'code': 400, 'message': 'Requested writing within range [Sheet1!B2:C2], but tried writing to row [3]', 'status': 'INVALID_ARGUMENT'}
this is my code
if sem == "Sem 1":
sh.update('B2:C2', [[str(gpa)], [str(unWeightedgpa)]])
It works if the cells used have the same letter. For example if it were A1:A2
I believe your goal is as follows.
[[str(gpa)], [str(unWeightedgpa)]]to cells "B2:C2" using gspread.In this case, how about the following modification?
From:
To:
sh, the values of[[str(gpa)], [str(unWeightedgpa)]]are put into "B2:C2".Note:
Reference: