Excel Update tablerow PatchAsync not available #2699
Labels
dependency:metadata
Awaiting fix from core dependency project module
type:feature
New experience request
I am trying to update a row in a table using GraphApi. According to the documentation, the code should look like this:
`using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new WorkbookTableRow
{
Index = 99,
Values = new UntypedString("values-value"),
};
var result = await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Workbook.Tables["{workbookTable-id}"].Rows["{workbookTableRow-id}"].PatchAsync(requestBody);`
I get the error message “The Api you are trying to use could not be found.”
The http call according to the documentation looks like this and does not work either. I get the same error message in Graph Explorer:
`PATCH https://graph.microsoft.com/v1.0/me/drive/items/{id}/workbook/tables/{id|name}/rows/{index}
Content-type: application/json
{
"index": 99,
"values": "values-value"
}
If I call the following in Graph Explorer, it works:
https://graph.microsoft.com/v1.0/drives/drive-id/items/driveItem-id/workbook/tables/table-id/rows/**itemAt(index=0)** { "values": "values-value" }
I think PatchAsync is missing. The call should look like this:
`var requestBody = new WorkbookTableRow
{
Values = new UntypedArray(new List
{
new UntypedArray(new List
{
new UntypedString("column1-value"),
new UntypedString("column2-value")
})
})
};
var result = await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Workbook.Tables["{workbookTable-id}"].Rows.ItemAtWithIndex(99).PatchAsync(requestBody);`
The text was updated successfully, but these errors were encountered: