gpt4 book ai didi

excel - microsoft graph excel api 文档中缺少表/范围相关方法的请求正文

转载 作者:行者123 更新时间:2023-12-02 22:32:47 25 4
gpt4 key购买 nike

我使用以下方法创建了一个表:

/v1.0/drives/{driveid}/items/{id}/workbook/worksheets/Sheet1/tables/add

请求正文:

{ "address": "A1:C2"}

无法使用以下方式将数据设置到表中:

/v1.0/drives/{driveid}/items/{id}/workbook/worksheets/Sheet1/tables/Table2/Range

请求正文:

{ "values": [["a", "b", "c"], ["1", "2", "3"]] }

收到此错误:

{
"error": {
"code": "InvalidArgument",
"message": "The argument is invalid or missing or has an incorrect format.",
"innerError": {
"request-id": "ea584370-dbb3-486f-9190-0cb8586c911c",
"date": "2017-08-21T12:44:48"
}
}
}

有人可以建议如何将数据设置到表中,第一行指示请求正文中的标题行吗?

最佳答案

adding a row to a table 的语法是:POST/workbook/tables/{id|name}/rows/add

以下示例来自documentation :

POST https://graph.microsoft.com/beta/me/drive/items/{id}/workbook/tables/{id|name}/rows/add
Content-type: application/json
Content-length: 51

{
"index": null,
"values": [
[1, 2, 3],
[4, 5, 6]
]
}

关于excel - microsoft graph excel api 文档中缺少表/范围相关方法的请求正文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45797851/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com