Search code examples
microsoft-graph-apimicrosoft-graph-excel

How to update rows using where condition in MsGraph Excel API


I am trying to do an update to a specific rows using Microsoft Graph API for Excel. Browsing through the documentation and googling, could't found out any way of working with the API to do an update like using a "where" query.

I have tried /filter/apply couple with /range/visibleView/rows, and was able to query like a where condition.

However, the index(rows) in patch uses absolute index value in the excel and not the current visibleView. Thus, I am not able to directly update a specific rows knowing what is the unique key that can use a "where" query.

Kind of defeat the purpose, if we have to query the whole table just to get the index for the update purpose, when the record list is huge.


Solution

  • I found my answer.

    visibleView come along with cellAddresses. In which we can use it to the row of the cell.

    Subsequently, can use that index to call the PATCH /tables/{table}/rows/$/ItemAt(index={index})