我在这里遵循googleapi指令https://developers.google.com/sheets/api/samples/writing,遇到了麻烦 使用此块:
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.
writing guide告诉您使用以下命令:
另一方面,您使用的是:
网址看起来不一样。您的URL中有一个不需要的
'\'
字符。你知道吗相关问题 更多 >
编程相关推荐