Using the new V2 functions in Web Services Spreadsheets

Released: January 20, 2026

Last updated: January 20, 2026

The latest update to PC*Miler Web Services Spreadsheets (Jan 2026) introduces our new V2 functions. These functions provide enhanced user customization by allowing you to specify route options directly within the function.

Currently, there are two V2 functions:

  • =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")

  • "Boston, MA" is the origin (Required argument). Locations can be entered in several formats.

  • "Columbus, OH" is the destination (Required argument). Locations can be entered in several formats.

  • "hwyOnly=true&ProfileName=Heavy Duty Doubles" is the string of route options (Optional argument). 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.

  1. Navigate to the mileage report page.

  2. Check the boxes next to all of the route options (parameter names) you would like to include in your spreadsheets miles or tolls requests.

  3. Add parameter values next to the boxes you have checked.

    ROGenerator

  4. Scroll down the page to the GET box. The GET URL displays the entire request that is sent to Web Services.

  5. 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)

    ROString
  6. 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")