The Scenario
You're a logistics planner and the scheduling meeting is at 2 PM. You have 5 depots in one worksheet and 50 customer stops in another, and the routing software your company uses needs a full travel-time matrix — every depot to every customer, in minutes — before it can generate route assignments. Right now you have coordinates but no matrix. The meeting is in three hours.
The bad version:
- Manually calculate each depot-to-customer combination by entering coordinates into Google Maps, reading the driving time, and typing it into a grid cell
- 5 depots times 50 customers is 250 individual lookups at about a minute each — that's four hours of work you don't have before a 2 PM meeting
- Make a lookup error at cell D17 and produce a routing plan that sends the wrong driver three hours in the wrong direction
You're supposed to walk into that meeting with a plan, not a workbook full of "TODO."
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It reads the depot and customer coordinates from whichever worksheets and columns you specify, calls TomTom's matrix routing API, and writes the full travel-time grid back into the workbook.
For the 10 origin coordinates in Sheet1 columns A and B and the 20 destination coordinates in Sheet2 columns A and B, build a TomTom distance matrix and write results as a table in Sheet3 with origins as rows and destinations as columns
What You Get
- A grid in Sheet3 with one row per origin and one column per destination
- Each cell contains the TomTom-calculated driving time in minutes for that pair
- Empty cells where TomTom returned no route, useful for catching coordinate errors
What If the Data Is Not Quite Ready
You need distance in km alongside travel time
Using origin coordinates in columns A and B and destination coordinates in columns D and E, calculate a TomTom routing matrix and write travel time in minutes into the grid starting at G1, and distance in km into a second matching grid starting at G60
Some customers are inactive this week
Using coordinates in columns A and B as origins and coordinates in columns D and E as destinations, build the TomTom matrix only for rows in the destinations sheet where column C says "active". Write travel times into a matrix grid in the "Matrix" sheet
Origins and destinations are addresses, not coordinates
For the depot addresses in Sheet1 column A and customer addresses in Sheet2 column A, geocode each using TomTom and then build a full travel-time matrix. Write the matrix into Sheet3 with depot names as row labels and customer names as column labels.
Full matrix with headers and a summary row
Build a TomTom travel-time matrix using depot coordinates in the "Depots" sheet columns A and B and customer coordinates in the "Customers" sheet columns A and B. Write the matrix into a new "Matrix" sheet with depot names as row labels and customer names as column labels. Add a bottom row showing the minimum travel time to each customer across all depots.
One prompt builds the full labeled matrix with the summary row.
Try It
Get the 7-day free trial of SheetXAI and open the Excel workbook with your depot and customer coordinates, then ask it to build the TomTom travel-time matrix. For sequencing stops once you have the matrix, see the waypoint optimization spoke.
