如何使用Microsoft Graph更新Excel中表的特定行?
问题描述:
我尝试使用Microsoft Graph在Excel中更新表格的特定行。如何使用Microsoft Graph更新Excel中表的特定行?
我没有在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]
]
}
答
您可以修补表格行如下。本示例更新包含4列的表的第2行(索引= 1)。请注意,索引值为0索引,并且标题行也不是这里的行集合的一部分。
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"
]]
}
如果要修补标题行,你可以使用PATCH ../tables/{id|name|}/rows/$/ItemAt(index={index}/headerRowRange
- 或 - 更新的路径中使用的PATCH ../tables/{id|name}/columns/{id}
路径表列的name
财产修补的基本范围values
财产
作品完美!只需要更新,让人们知道这个 –
我们如何删除特定的行? –