Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google spreadsheet API v4 - Find value

How can i search a google spreadsheet using new api v4.

In the api docs i found find/replace, but it can't find cells, it only replaces cells. So is there any method to find a value in a google spreadsheet other than brute-force method of fetching all data and searching in it?

like image 990
Nithin Avatar asked Jan 05 '23 15:01

Nithin


1 Answers

This is a little bit of a kludge, but I create a cell using the API with this formula to search a specified column in a sheet:

=ADDRESS(MATCH("SEARCHSTRING",A1:A999),2)

This does mean I have to make three different calls (write, read, and clear) and it only works on a single column or row, but I find it useful for large spreadsheets.

like image 117
saltface Avatar answered Jan 07 '23 06:01

saltface