小编pyt*_*ete的帖子

如何使用 Google Sheets API 添加超链接?

我正在尝试编写一个 python 脚本来向谷歌表添加超链接。为此,我正在使用 google api。通过搜索,我发现我需要向其余 api 传递“=HYPERLINK()”类型的消息。

来自文档:https : //developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#ExtendedValue.FIELDS.formula_value

{
  // Union field value can be only one of the following:
  "numberValue": number,
  "stringValue": string,
  "boolValue": boolean,
  "formulaValue": string,
  "errorValue": {
    object(ErrorValue)
  }
  // End of list of possible types for union field value.
}
Run Code Online (Sandbox Code Playgroud)

看起来我应该使用“formulaValue”属性。

编辑:我尝试使用UpdateCells请求

编辑:下面的解决方案。

google-sheets-api

2
推荐指数
1
解决办法
1851
查看次数

标签 统计

google-sheets-api ×1