A new PC*Miler Web Services Spreadsheets update is now available
Released: January 16, 2026
Last updated: January 20, 2026
The latest update to PC*Miler Web Services Spreadsheets introduces two new functions designed to significantly enhance your ability to customize routes for distance and toll cost calculations.
Additionally, you can add a new configuration (.ini) file to boost performance by allowing you to set default values for the PC*Miler data region, data version, and country used in your calculations.
New Functions
The two new functions are:
-
=MilesWSV2(Origin, Destination, Route Options) - returns the mileage between two points (origin to the destination).
-
=TollsWSV2(Origin, Destination, Route Options) - calculates accurate, up-to-date toll charges in the U.S. and Canada.
These new functions give you the same information as the legacy functions =MilesWS and =TollsWS, but offer more customization without requiring additional functions.
How do the new functions work?
You type in a starting point (Origin) and an ending point (Destination), just like before. But the third thing you add is a string of “route options”. These options follow the flexible format used by PC*Miler Web Services. The same input format is used for both =MilesWSV2 and =TollsWSV2.
Example
=MilesWSV2("Boston, MA", "Columbus, OH","hwyOnly=true&ProfileName=Heavy Duty Doubles")
-
(Required argument) "Boston, MA" is the origin. Locations can be entered in several formats.
-
(Required argument) "Columbus, OH" is the destination. Locations can be entered in several formats.
-
(Optional argument) "hwyOnly=true&ProfileName=Heavy Duty Doubles" is the string with the route options. In this case, we are telling PC*Miler to calculate mileage based on a Heavy Duty Doubles truck routing on highways only. Dozens of options are possible.
| If you don’t enter route options, Web Services Spreadsheets will use PC*Miler default values. |
Build a route options string
The route options string can include any of the available PC*Miler Web Services route options.
The string should follow the format: {Option parameter name}={Option parameter value}, with each option separated by an ampersand (&). Options can be in any order, and you do not need to include any options if you want to use PC*Miler defaults.
A full list of available route options, including parameter names and parameter values, is available on the Trimble Maps Developer portal.
Generate and copy route options using interactive documentation
You can use our interactive documentation to construct your route options string.
-
Navigate to the mileage report page.
-
Check the boxes next to all of the route options (parameter names) you would like to include in your spreadsheets miles or tolls requests.
-
Add parameter values next to the boxes you have checked.

-
Scroll down the page to the GET box. The GET URL displays the entire request that is sent to Web Services.
-
For Spreadsheets, you only need the last part of the string, which shows the route options you have selected. The options are everything after the report name. In this example, it’s “routeType=Practical&hwyOnly=true&avoidTolls=true.” (Select image to enlarge)
-
Cut and paste this as the Route Options string in your spreadsheets function. (e.g. =MilesWSV2("Boston, MA", "Columbus, OH","routeType=Practical&hwyOnly=true&avoidTolls=true")
Simplify with the .ini configuration file
The latest update to Web Services Spreadsheets can read a user-created text file titled pcmwebserve.ini with four default settings that simplify requests for mileage, tolls, or location data.
In the .ini file, you can preset default values used by every spreadsheet function. This improves results and reduces the number of arguments needed in your spreadsheet calls. The four settings and their “out-of-the-box” defaults are:
-
LOGGING=ENABLE - This setting should be left alone. It is used to log issues with the software in the event that you need help from our technical support team.
-
REGION=NA - The default region is North America “NA.” This value can be set to any two-letter region code your API key is licensed to use. AF - Africa; AS - Asia; EU - Europe; OC - Oceania; SA - South America; ME - Middle East
-
COUNTRY=US - The two-letter (ISO2) country code. Selecting a country is important for more precise matching of locations.
-
PCMVERSION=CURRENT - This is the PC*Miler version used for route (and mileage) calculation. When setting this value, use PCMXX where XX is the version number, or use CURRENT for the latest version. The versions available include PCM18-Current.
How to use an .ini file
-
Download this sample .ini file to your computer. Do not change the file name.
-
Open the file in a text editor (like Notepad), and edit the REGION, COUNTRY, and PCMVERSION values to match your needs.
-
Save your edited pcmwebserve.ini file in the folder on your computer where you have saved "Excel WebServices Add-In.xlam" (that’s the PC*Miler Spreadsheet add-in file). Be sure to remove any existing pcmwebserve.ini file that is present in this folder.
-
You can change any value you need for your spreadsheets by editing and re-saving your new file at any time.