【发布时间】:2017-09-05 07:15:59
【问题描述】:
无法获得 Values.update 的正确/正确语法,Google 文档中没有 Google Apps 脚本的代码示例。尝试使用 batchUpdate 中的代码模式将范围限制为一,但它不起作用。谁能建议Values.update 的正确语法?代码如下:
function updateOneCell() {
var spreadsheetId = "someSpreadsheetId";
var request = {
"valueInputOption": "USER_ENTERED",
"data": [
{
"range": "Sheet1!BW7",
"majorDimension": "ROWS",
"values": [[new Date()]]
}
]
};
Sheets.Spreadsheets.Values.update(request, spreadsheetId);
}
出现以下错误:
提供的参数数量无效。预计只有 3-4 个
谢谢。
【问题讨论】:
标签: google-apps-script google-sheets-api