0

I am using the Google Sheets V4 API, everything I used it for works perfectly fine, but I didn't find a way to enter a value and get the row where that value is, basically searching for it if you get what I mean. Is it even possible? Or is there an alternative way to do it?

SmooK
  • 47
  • 6
  • Could this help? https://stackoverflow.com/questions/49161249/google-sheets-api-how-to-find-a-row-by-value-and-update-its-content – Nick Proud Nov 27 '19 at 14:41

1 Answers1

0

At the moment there is no endpoint in the API that supports this functionality.

As a workaround, you can:

  1. Obtain all the data in the Sheet and iterate over it, until you find the value. This method, if the Sheet is large, can take quite a while - and the bandwidth consumption can be considerably large.
  2. Inject a =MATCH() function call that searches throughout all the Sheet. Afterwards, simply retrieve the value computed by it. In this case, the bandwidth will be lower - although the method may take more time overall since more requests are involved. You can learn more about this option in this Stackoverflow question: Google Sheets API: How to find a row by value and update it's content
carlesgg97
  • 4,184
  • 1
  • 8
  • 24