Skip to content

About

Geocode addresses in Google Sheets with a Google Apps Script utility using Google Maps.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geocode-Google-Sheets

A Google Apps Script function to geocode addresses in Google Sheets using the Google Maps API.

Geocode Google Apps Script

This repository contains a Google Apps Script function for geocoding addresses using the Google Maps Geocoder service.

Files

  • Code.gs: Contains the GEOCODE_GOOGLE function.

Usage

  1. Copy the function in Code.gs into your Google Apps Script project.
  2. Call GEOCODE_GOOGLE(address) from your script or a custom menu.
    • Pass a single address (string) to receive a latitude/longitude string.
    • Pass an array of addresses (string[]) to receive an array of latitude/longitude strings.

Example

var result = GEOCODE_GOOGLE("1600 Amphitheatre Parkway, Mountain View, CA");
Logger.log(result); // e.g. "37.422, -122.084"

Google Sheets Example

Within Google Sheets, you can use your custom function to geocode addresses directly in a cell. For example:

=GEOCODE_GOOGLE("1600 Amphitheatre Parkway, Mountain View, CA")

This will return the latitude/longitude in a single cell. If you pass in a range of cells containing multiple addresses, it will return an array of coordinates.

Maintenance and support

This small utility is provided as-is, without a support or release schedule. Issues and pull requests are welcome. See CONTRIBUTING.md for manual checks and SECURITY.md for private security reports.

License

MIT.

About

Geocode addresses in Google Sheets with a Google Apps Script utility using Google Maps.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages