Currently, I have a webpage that embeds the following IFRAME:
<iframe src="https://docs.google.com/spreadsheets/u/0/d/1P9DhWOHcl14Y7-P5wCxTm-sUceckGquPoOobO75XhvM/htmlembed/sheet?gid=630924986&single=true" frameborder="0" width="393px" height="385px" style="float:centre" id="MyFrame"></iframe>
The contents of the cells are changed based on formulas. I am trying to find a way that would check if one of the cells (in this case, the cell containing "Foo" listed with a class of "S2" (see here)) contains a string. Depending on the result, it would print different things to the console. For example:
if <"Cell from inside the IFRAME with class S2"> = "stringtosearch"
//found
console.log("The cell contains stringtosearch!")
else
//not found
console.log("The cell does not contain stringtosearch. :( ")
Any help with a way of achieving this would be appreciated! I believe it can be done with jQuery, but I'm not sure on the best way to do it. I'm still new to JS.
Note: I would need to embed this into a Chrome Extension, so I cannot use the option of pulling the Google Sheets API and searching it that way, as Chrome Extensions do not allow Inline Scripting.
Thanks!