So, i've made an application that fetches data from Spreadsheet with a rest api call. This data is being mapped from the ValueRange object to a list of custom object and cached in the application for 10 minutes.
I'd like to be able to update a single cell of a specified row of which I do not know the range value (for example 'E9') of.
Is there a good way to loop through the items in the spreadsheet and update a cell value where another field value matches?!
public static void UpdateQuantity(string nameToMatch, int quantity)
{
// find row where column A matches nameToMatch
// update value of column B with quantity
// finally clear cache to get the new data
CacheHelper.ClearCache();
}
If else, when iterating through rows in spreadsheet, how do I know the current row number so I would do a REST call to update the specific cell?
Thanks in advance.