Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用google api v4(google sheets)按值查找单元格_Python_Python 3.x_Google Sheets_Google Api_Google Sheets Api - Fatal编程技术网

Python 使用google api v4(google sheets)按值查找单元格

Python 使用google api v4(google sheets)按值查找单元格,python,python-3.x,google-sheets,google-api,google-sheets-api,Python,Python 3.x,Google Sheets,Google Api,Google Sheets Api,我可以使用google api v4按值查找单元格吗?在我的任务中,如果单元格值==我的值,我希望更改背景颜色 我只知道一种变体它是: 使用gspread,我可以找到单元格坐标 使用谷歌api v4我可以改变背景颜色 但我只想使用google api v4,因为使用gspread按值查找单元格的速度非常慢。支持使用Sheets api获取单元格的值。检查一下。 可在中找到用于读取的代码示例 读取单个范围 以下spreadsheets.values.get请求读取存储在范围表1中的值!A1:D5,

我可以使用google api v4按值查找单元格吗?在我的任务中,如果单元格值==我的值,我希望更改背景颜色

我只知道一种变体它是:

使用gspread,我可以找到单元格坐标 使用谷歌api v4我可以改变背景颜色
但我只想使用google api v4,因为使用gspread按值查找单元格的速度非常慢。

支持使用Sheets api获取单元格的值。检查一下。 可在中找到用于读取的代码示例

读取单个范围

以下spreadsheets.values.get请求读取存储在范围表1中的值!A1:D5,并在响应中返回它们。省略空的后续行和列

请求协议如下所示。《读写值指南》展示了如何使用GoogleAPI客户端库实现不同语言的读取

GET https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId/values/Sheet1!A1:D5

支持使用Sheets API获取单元格值。检查一下。 可在中找到用于读取的代码示例

读取单个范围

以下spreadsheets.values.get请求读取存储在范围表1中的值!A1:D5,并在响应中返回它们。省略空的后续行和列

请求协议如下所示。《读写值指南》展示了如何使用GoogleAPI客户端库实现不同语言的读取

GET https://sheets.googleapis.com/v4/spreadsheets/spreadsheetId/values/Sheet1!A1:D5

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.
}

只选择范围选项范围、sheetID或allSheets中的一个。

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.
}

仅选择范围选项范围、sheetID或allSheets中的一个。

如果要使用电子表格.batchUpdate,我需要获取显示我的\u文本的行和列。当然,我可以读取工作表中的所有数据并返回文本所在的行和列,但我认为GoogleAPI有另一种获取单元格坐标的方法text@OsiaButorin你觉得呢?你的参考文献在哪里?我没有这个问题的参考文献,但是如果行和列需要batchUpdate方法,那么必须有一个方法来搜索这些值并返回它们的值。是否?SheetsAPI现在有getRow或getColumn,但您可以检查。当然,但Row和Column操作无法解决在Sheet上查找单元格坐标的问题。如果我想使用电子表格。batchUpdate,我需要获取我的文本所在的行和列。当然,我可以读取工作表中的所有数据并返回文本所在的行和列,但我认为GoogleAPI有另一种获取单元格坐标的方法text@OsiaButorin你觉得呢?你的参考文献在哪里?我没有这个问题的参考文献,但是如果行和列需要batchUpdate方法,那么必须有一个方法来搜索这些值并返回它们的值。是否?SheetsAPI现在有getRow或getColumn,但您可以检查。当然,但Row和Column操作无法解决在SheetsAPI上查找单元格坐标的问题。此请求正文使用哪种工作表api?很抱歉,我找不到。此请求正文使用哪一页api?对不起,我找不到。