Google Docs API - 更新链接表

2023-12-03

我正在尝试使用新的 API 更新 Google 文档中的表格。表格是从 Google Sheet 链接的。

我尝试了谷歌云中的API资源管理器。我能够提取 json 格式的文档,然后过滤掉表格。但在表 json 结构中,我没有找到任何可以更新的内容,也没有找到任何将表链接到电子表格的内容。它是纯文本(来自电子表格中的单元格)。

在这里,我共享 json 中的一张表,其中有 2 行和 1 列,单元格值为“书面英语”和“口头英语”。

        "table": {
        "rows": 2,
        "columns": 1,
        "tableRows": [
        {
        "startIndex": 77,
        "endIndex": 95,
        "tableCells": [
            {
            "startIndex": 78,
            "endIndex": 95,
            "content": [
            {
            "startIndex": 79,
            "endIndex": 95,
            "paragraph": {
                "elements": [
                {
                "startIndex": 79,
                "endIndex": 94,
                "textRun": {
                "content": "Written English",
                "textStyle": {
                    "underline": true,
                    "foregroundColor": {
                    "color": {
                    "rgbColor": {
                    "red": 0.06666667,
                    "green": 0.33333334,
                    "blue": 0.8
                    }
                    }
                    },
                    "fontSize": {
                    "magnitude": 24,
                    "unit": "PT"
                    },
                    "weightedFontFamily": {
                    "fontFamily": "Arial",
                    "weight": 400
                    }
                }
                }
                },
                {
                "startIndex": 94,
                "endIndex": 95,
                "textRun": {
                "content": "\n",
                "textStyle": {
                    "foregroundColor": {
                    "color": {
                    "rgbColor": {
                    "red": 0.8784314,
                    "green": 0.16078432,
                    "blue": 0.42352942
                    }
                    }
                    },
                    "fontSize": {
                    "magnitude": 24,
                    "unit": "PT"
                    },
                    "weightedFontFamily": {
                    "fontFamily": "Arial",
                    "weight": 400
                    }
                }
                }
                }
                ],
                "paragraphStyle": {
                "namedStyleType": "NORMAL_TEXT",
                "lineSpacing": 115,
                "direction": "LEFT_TO_RIGHT",
                "spacingMode": "COLLAPSE_LISTS",
                "spaceAbove": {
                "unit": "PT"
                },
                "avoidWidowAndOrphan": false
                }
            }
            }
            ],
            "tableCellStyle": {
            "rowSpan": 1,
            "columnSpan": 1,
            "backgroundColor": {
            "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
            }
            },
            "borderLeft": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "borderRight": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "borderTop": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "borderBottom": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "paddingLeft": {
            "magnitude": 2,
            "unit": "PT"
            },
            "paddingRight": {
            "magnitude": 2,
            "unit": "PT"
            },
            "paddingTop": {
            "magnitude": 2,
            "unit": "PT"
            },
            "paddingBottom": {
            "magnitude": 2,
            "unit": "PT"
            },
            "contentAlignment": "BOTTOM"
            }
            }
        ],
        "tableRowStyle": {
            "minRowHeight": {
            "magnitude": 15,
            "unit": "PT"
            }
        }
        },
        {
        "startIndex": 95,
        "endIndex": 112,
        "tableCells": [
            {
            "startIndex": 96,
            "endIndex": 112,
            "content": [
            {
            "startIndex": 97,
            "endIndex": 112,
            "paragraph": {
                "elements": [
                {
                "startIndex": 97,
                "endIndex": 111,
                "textRun": {
                "content": "Verbal English",
                "textStyle": {
                    "underline": true,
                    "foregroundColor": {
                    "color": {
                    "rgbColor": {
                    "red": 0.06666667,
                    "green": 0.33333334,
                    "blue": 0.8
                    }
                    }
                    },
                    "fontSize": {
                    "magnitude": 14,
                    "unit": "PT"
                    },
                    "weightedFontFamily": {
                    "fontFamily": "Raleway",
                    "weight": 400
                    }
                }
                }
                },
                {
                "startIndex": 111,
                "endIndex": 112,
                "textRun": {
                "content": "\n",
                "textStyle": {
                    "foregroundColor": {
                    "color": {
                    "rgbColor": {
                    "red": 0.8784314,
                    "green": 0.16078432,
                    "blue": 0.42352942
                    }
                    }
                    },
                    "fontSize": {
                    "magnitude": 14,
                    "unit": "PT"
                    },
                    "weightedFontFamily": {
                    "fontFamily": "Arial",
                    "weight": 400
                    }
                }
                }
                }
                ],
                "paragraphStyle": {
                "namedStyleType": "NORMAL_TEXT",
                "lineSpacing": 115,
                "direction": "LEFT_TO_RIGHT",
                "spacingMode": "COLLAPSE_LISTS",
                "spaceAbove": {
                "unit": "PT"
                },
                "avoidWidowAndOrphan": false
                }
            }
            }
            ],
            "tableCellStyle": {
            "rowSpan": 1,
            "columnSpan": 1,
            "backgroundColor": {
            },
            "borderLeft": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "borderRight": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "borderTop": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "borderBottom": {
            "color": {
                "color": {
                "rgbColor": {
                "red": 1,
                "green": 1,
                "blue": 1
                }
                }
            },
            "width": {
                "magnitude": 0.75,
                "unit": "PT"
            },
            "dashStyle": "SOLID"
            },
            "paddingLeft": {
            "magnitude": 2,
            "unit": "PT"
            },
            "paddingRight": {
            "magnitude": 2,
            "unit": "PT"
            },
            "paddingTop": {
            "magnitude": 2,
            "unit": "PT"
            },
            "paddingBottom": {
            "magnitude": 2,
            "unit": "PT"
            },
            "contentAlignment": "BOTTOM"
            }
            }
        ],
        "tableRowStyle": {
            "minRowHeight": {
            "magnitude": 15,
            "unit": "PT"
            }
        }
        }
        ],
        "tableStyle": {
        "tableColumnProperties": [
        {
            "widthType": "FIXED_WIDTH",
            "width": {
            "magnitude": 363,
            "unit": "PT"
            }
        }
        ]
        }
        }

简而言之,我正在尝试以编程方式执行“更新”按钮在 Google 文档中的链接表上执行的操作。

期待任何帮助。 谢谢。


问题已创建在问题跟踪器中。给这个问题加注星标(在左上角),以帮助 Google 优先考虑该问题!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Google Docs API - 更新链接表 的相关文章

随机推荐

  • 如何比较条件中的两个字段/列?

    我很难弄清楚如何让子查询工作 想象一下我有 schools gt select this gt Schools gt select pupilcount gt this gt Pupils gt find gt select this gt
  • UITableView 可编辑(可重新排列),无需删除单元格

    我想知道是否有一种方法可以使 UITableView 可编辑 用户可以重新排列 移动 单个 TableView 单元格 但不会出现 删除单元格 功能 感谢您的帮助 sam 您是否尝试过实现editingStyleForRowAtIndexP
  • 已弃用、已折旧和已过时之间的区别[关闭]

    Closed 这个问题不符合堆栈溢出指南 目前不接受答案 对此有很多困惑 我想知道 两者之间到底有什么区别折旧的 已弃用 and obsolete 在编程环境中 而且在一般情况下也是如此 我知道我可以看一本在线词典 而且我已经看过了 甚至很
  • 使用 console.log 检查 FormData 对象[重复]

    这个问题在这里已经有答案了 我已经创建了FormData像这样创建的对象 var data new FormData data append image input 0 files 0 data append user hubot 现在当我
  • 对列中的多个值使用 ifelse 语句

    我有一个大约有 3000 行的表 其数据格式为 Number Type 10001 0 10005 7 10006 0 10007 14 10012 16 10022 14 10023 0 10024 0 10029 7 10035 17
  • 为什么应该使用 strncpy 而不是 strcpy?

    编辑 我已经添加了示例的源代码 我碰到这个例子 char source MAX 123456789 char source1 MAX 123456789 char destination MAX abcdefg char destinati
  • 如何将多个 Seaborn 绘图保存到单个 pdf 文件中

    因此 我尝试将在 for 循环中创建的多个绘图保存到单个 pdf 文件中 我在 SO 上进行了搜索 并拼凑了一些似乎可以工作的代码 除了它不保存它创建的 pdf 中的数字 但其中没有任何内容 这是重现它的代码 import numpy as
  • 如何以及何时在 Python Pandas 中使用链索引?

    我正在学习数据科学course关于 Python 中的数据分析 在课程中的某个时刻 教授说 您可以将操作链接在一起 例如 我们可以重写查询 所有 Store 1 的成本为 df loc Store 1 Cost 这看起来很合理 并且得到了我
  • 如何编辑 gpedit 策略

    我想问一下如何使用C 编辑gpedit msc策略 gpedit msc 只是注册表设置的一个界面 gpedit 没有 API 或公开框架 要像 gpedit 一样操作一个值 您需要操作关联的注册表键值 class RegKey stati
  • 如何用 python 检测按键释放(而不是按键)?

    如何使用 python 3 检测按键释放 就像我按下了键一样a1秒 当我将手指从琴键上移开时 松开钥匙 它会print Key a pressed then released 我尝试用模块来做到这一点keyboard但我不知道如何使用它 我
  • 为什么在 R 中会导致无效格式 '%d?

    下面给出的代码是将二进制文件从 float32 转换为比例因子为 10 的 16b 我收到 d 无效的错误 setwd C 2001 for b in paste data 1 365 flt sep conne lt file b rb
  • 如何抓取动态分配其内容的 Microsoft CVE 网页(最好使用 Python)?

    相关页面是https portal msrc microsoft com en US security guidance advisory CVE 2018 8176 查看页面源代码时 我没有获得有关渲染页面内容的任何相关信息 如何抓取描述
  • 如何让2个div同时滚动

    对于我的网站设计 我有一个 div class stuffhere div 内容存储的位置 这些 div 有 2 个 第二个在第一个之前 借助z index 还有两者的内容stuffhere标签重复 但有时顶层的图像stuffhere被替换
  • PhpMyAdmin 安装错误

    我刚刚在 Linux Fedora 13 上使用 PHP 5 3 3 安装了 phpmyadmin 我收到以下 2 个错误 首先 我在登录屏幕上看到以下内容 无法加载 mcrypt 扩展 请 检查你的 PHP 配置 我在 google 上搜
  • Python-从长时间运行的子进程读取输出[重复]

    这个问题在这里已经有答案了 使用 subprocess 模块 Python 2 7 我正在运行命令并尝试在运行时处理其输出 我有如下代码 process subprocess Popen udevadm monitor subsystem
  • svn:switch 不能与相对的 svn:external 一起使用吗?

    我们有一个相对 svn external 的子文件夹 project subfolder 在新的主干结帐中 它指向 TRUNK project subfolder 在新的分支结帐中 它指向 BRANCH branchName project
  • AJAX JQUERY 相关:- 如何在 ajax 加载的页面上调用 ajax

    假设我通过 AJAX 调用搜索 现在我想在页面上调用另一个AJAX 该AJAX将由AJAX加载并且可以编辑
  • 使用 iText 获取 PDF 文件中的图像 DPI

    我正在尝试获取有关通过 iText 使用 Java 保存到 PDF 文件中的扫描图像的信息 Using 答案和评论 我得到了宽度和高度 通过 Matrix 或通过 BufferedImage 我们的想法是使用answer这里计算DPI 但我
  • 用贝塞尔曲线绘制圆弧

    我正在尝试使用贝塞尔曲线绘制圆弧 我了解到 您无法使用贝塞尔曲线绘制完美的圆 但您可以接近 不幸的是 数学太复杂了 我个人无法弄清楚 我可以将下面的 A1 切片创建为三角形 但我不知道如何确定控制点 另外 如果我尝试沿相反方向从圆中绘制一个
  • Google Docs API - 更新链接表

    我正在尝试使用新的 API 更新 Google 文档中的表格 表格是从 Google Sheet 链接的 我尝试了谷歌云中的API资源管理器 我能够提取 json 格式的文档 然后过滤掉表格 但在表 json 结构中 我没有找到任何可以更新