如何使用 Microsoft Graph 更新 Excel 中 table 的特定行?
How to update a specific row of a table in Excel using Microsoft Graph?
我尝试使用 Microsoft Graph 更新 Excel 中 table 的特定行。
我在 the table section 中没有找到任何文档。
比如我要更新第6行(索引5)
有这样的方法吗?谢谢
PATCH:
https://graph.microsoft.com/beta/me/drive/items/12345/workbook/tables/Table1/rows/update
{
"index": 5,
"values": [
[1, 2, 3]
]
}
您可以按如下方式修补 table 行。此示例更新包含 4 列的 table 的第 2 行(索引=1)。请注意,索引值是从 0 开始索引的,并且 header 行不是此处行 collection 的一部分。
PATCH https://graph.microsoft.com/v1.0/me/drive/root:/nameditemtest.xlsx:/workbook/worksheets/sheet1/tables/Table1/rows/$/ItemAt(index=1)
{
"values": [
[
"A",
"B",
"C",
"D"
]]
}
如果您希望修补 header 行,您可以使用 PATCH ../tables/{id|name|}/rows/$/ItemAt(index={index}/headerRowRange
的路径修补基础范围 values
属性 - 或 - 更新 [=13= table 列的 属性 使用 PATCH ../tables/{id|name}/columns/{id}
的路径
我尝试使用 Microsoft Graph 更新 Excel 中 table 的特定行。
我在 the table section 中没有找到任何文档。
比如我要更新第6行(索引5)
有这样的方法吗?谢谢
PATCH:
https://graph.microsoft.com/beta/me/drive/items/12345/workbook/tables/Table1/rows/update
{
"index": 5,
"values": [
[1, 2, 3]
]
}
您可以按如下方式修补 table 行。此示例更新包含 4 列的 table 的第 2 行(索引=1)。请注意,索引值是从 0 开始索引的,并且 header 行不是此处行 collection 的一部分。
PATCH https://graph.microsoft.com/v1.0/me/drive/root:/nameditemtest.xlsx:/workbook/worksheets/sheet1/tables/Table1/rows/$/ItemAt(index=1)
{
"values": [
[
"A",
"B",
"C",
"D"
]]
}
如果您希望修补 header 行,您可以使用 PATCH ../tables/{id|name|}/rows/$/ItemAt(index={index}/headerRowRange
的路径修补基础范围 values
属性 - 或 - 更新 [=13= table 列的 属性 使用 PATCH ../tables/{id|name}/columns/{id}