gpt4 book ai didi

excel - 是否可以使用 Graph Rest Api 删除 Excel 表中的所有行?

转载 作者:行者123 更新时间:2023-12-04 21:28:37 26 4
gpt4 key购买 nike

我知道我可以使用 this 删除单行方法:

DELETE https://graph.microsoft.com/v1.0/drives/{drive-id}/items/{item-id}/workbook/tables/AccountRegister/rows/$/ItemAt(index={n})

(为了他人的利益 this 文档是错误的)。

是否有删除所有行(或一系列行)的端点?

最佳答案

您可以使用 POST 调用批量删除它们。
引用:https://docs.microsoft.com/en-us/graph/json-batching
要发布的示例 json 正文

{
"requests": [
{
"id": "1",
"method": "DELETE",
"url": "/drives/{drive-id}/items/{item-id}/workbook/tables/AccountRegister/rows/$/ItemAt(index={0}"
},
{
"id": "2",
"method": "DELETE",
"url": "/drives/{drive-id}/items/{item-id}/workbook/tables/AccountRegister/rows/$/ItemAt(index={1}"
}
}
这将删除表的第 1 行和第 2 行。 header 从索引中排除。
供引用。有限制:目前批量调用不超过 20 个。
https://docs.microsoft.com/en-us/graph/known-issues#json-batching

关于excel - 是否可以使用 Graph Rest Api 删除 Excel 表中的所有行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62353086/

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