In Google Spreadsheet, what do you call CIty, an IP country?

I would like to know if there is a formula / script that can be used on Google Spreadsheet to get the City, Location array of IP addresses.

It can be assumed that each cell in column A has 100 IP addresses, which formula / script should be used in column B to get the corresponding city and location?

+4
source share
2 answers

After some digging, I figured out how to do it.

  • import_json_appsscript.js script https://gist.github.com/chrislkeller/5719258. script, ImportJSON() Google

  • Google, > script

  • import_json_appsscript.js script . , ImportJSON() " ".

  • = ImportJSON (url, query, options), =ImportJSON("http://freegeoip.net/json/75.148.30.137", "/city", "noHeaders") Baltimore FreeGeoIP.

, , , , .

+4

- , freegeoip.net, .

http://freegeoip.net/

, IP- 75.148.30.137 :

http://freegeoip.net/json/75.148.30.137

, Google , Google:

https://developers.google.com/apps-script/guides/services/external

.

+1

All Articles