在谷歌工作表API guide
我读到find
请求(查找值为'X'的单元格)可以用JSON格式如下:
{
"find": string,
"replacement": string,
"matchCase": boolean,
"matchEntireCell": boolean,
"searchByRegex": boolean,
"includeFormulas": boolean,
// Union field scope can be only one of the following:
"range": {
object(GridRange)
},
"sheetId": number,
"allSheets": boolean,
// End of list of possible types for union field scope.
}
请求可以用这个URL的形式发出 https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId。。。。。。。在
但我无法将其转换为JAVA代码
我发现的最接近的是一个论坛上的代码:
^{pr2}$它缺少我期望从API得到的响应,让我知道工作表中的哪个单元格具有我要查找的值。在
谢谢
看起来您只是部分复制了本页指南中的示例:https://developers.google.com/sheets/api/guides/batchupdate#example
您需要将FindReplaceRequest放入
BatchUpdateSpreadsheetRequest
(在requests
字段中),并在Spreadsheets.BatchUpdate
调用中发送它。在完整的例子是:
相关问题 更多 >
编程相关推荐