-2

I have a google sheet with a string in a cell. I found a way to generate a url that point to the string in that cell. For example, the following link goes to the String:

this is a test string from GSheet

https://docs.google.com/spreadsheets/d/1LGZNL5B4SL-lvkjuj2OxMSPdB66j5rEdx1b-ids7a0I/gviz/tq?tqx=out:html&tq=select%20A%20where%20A%20%21%3d%27%20%27

I'd like to get this string, given a url, from a js file.

...or I might be over complicating things and there's an easier way to get a string from Google Sheets?

My end goal is to have anybody with a link be able to update a string that is in a js file.

Sparky
  • 9
  • 1

1 Answers1

0

There are these cute things called query string parameters. You can use them to retrieve non-private data from a URL.

To retrieve parameters that are visible in the url(We call these GET parameters) via javascript, you can check this answer: How can I get query string values in JavaScript?

Gökhan Mete ERTÜRK
  • 3,378
  • 2
  • 19
  • 23