Excel

Distance Matrix

Excel interface for the Distance Matrix API.

The Distance Matrix allows you to calculate road network distances between source and destination locations.

Input Worksheet #

To start with, create a sample template worksheet. You can then run the example or enter your own data.

Worksheet name: DM-Locations

The following fields must be entered for each location:

  • ID: A unique ID.
  • Longitude(x): The longitude of the location in decimal degrees.
  • Latitude(y): The latitude of the location in decimal degrees.
  • Source: A 1 to indicate if the the location should be considered as a source, 0 otherwise.
  • Destination: A 1 to indicate if the location should be considered as a destination, 0 otherwise.

Output Worksheets #

The following information is returned from the Distance Matrix solver.

Worksheet name: DM-Elements

  • From ID: The From Location ID.
  • To ID: The To Location ID.
  • Distance: The distance between the locations as measured by the Distance units specified prior to submitting the data.
  • Duration: The time taken to travel between the two locations as measured by the Time units specified prior to submitting the data.

Last updated 4 December 2023