Force Save/Update a Sheet via API

cmertz
cmertz
edited 09/12/23 in API & Developers

I am using REST API to automatically update/format cells based on the results of an Azure DevOps query. I am stepping through each value in the query and either inserting the value or appending it to the existing values in the cell. However, the sheet does not save after each value is updated, so I am constantly overwriting the values as when I attempt to GET the value of a cell I just authored, it is returning as null. Is there a way to force save/update after each PUT request so that my next GET returns the new values?

Answers

  • Ryan Kramer
    Ryan Kramer ✭✭✭✭✭
    edited 09/20/23

    So it should save after each update.

    The way that I normally do this is to gather all of the changes first. This means taking the data from the sheet and the data from your query result and building the cell updates. Then you can perform a single update (or I usually do them 2-300 at a time. This will decrease the load on the API since you are not making so many small updates and should overall improve the process.

    Hope this helps!

    Ryan