Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm considering Apps script for a small project that involves fetching data from a local server that's not on the internet and then populating a Google sheets spread sheet with the data... I can't seem to find a clear answer to this question anywhere.

Is it possible to make HTTP requests from a Google spread sheet using Apps Script to a local server? I'm assuming as the Javascript is Client side code it should be possible?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
811 views
Welcome To Ask or Share your Answers For Others

1 Answer

It is possible as long as the local server is route able from a public address. Apps Script runs exclusively on Google's infrastructure so even when you click run in the IDE it is not your browser running the code, but a google server. There is a way to work around this as app script can serve webpages that can communicate with your script called webapps. The served webpages do run in your browser and can access the localhost.

https://developers.google.com/apps-script/guides/web
https://developers.google.com/apps-script/guides/html/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...