0
PUT https://sheets.googleapis.com/v4/spreadsheets/spreadsheets/d/\
spreadsheetId/values/sheet1!A1:D5?valueInputOption=USER_ENTERED
values = {
"range": "'Main'!A1:D5",
"majorDimension": "ROWS",
"values": [
["Item", "Cost", "Stocked", "Ship Date"],
["Wheel", "$20.50", "4", "3/1/2016"], #new row
["Door", "$15", "2", "3/15/2016"],
["Engine", "$100", "1", "30/20/2016"],
["Totals", "=SUM(B2:B4)", "=SUM(C2:C4)", "=MAX(D2:D4)"]
],
}
which gives PUT https://sheets.googleapis.com/v4/spreadsheets/\
spreadsheets/d/spreadsheetId/values/\
sheet1!A1:D5?\valueInputOption=USER_ENTERED
^
SyntaxError: invalid syntax
This is copied directly from the API documentation. Help! What is wrong?
Thanks.
これを「PUT ...」にするPythonコードはどこにありますか?それなしでは助けられない。 – glenfant
これはPythonコードではありません。 Python APIを提供する[別のページ](https://developers.google.com/sheets/api/guides/values#writing)があります。 – roganjosh
間違いなくPythonコードです。開始手順については、https://developers.google.com/sheets/api/quickstart/pythonのこちらの指示をご覧ください。 – swatchai