P1TS Data Excel Add-In - User's Guide

Version 0.0.3
Engineering Preview, February 12, 2024
taskpane-guide.html

This is an Engineering Preview used for soliciting early usability feedback from engineers. Although we've run it through several 24 hour stress tests, we highly recommend you experiment with it in non-mission critical conditions.

P1TS Data is an Excel add-in that live fetches data from a P1TS server and directly writes data into into your Excel spreadsheets for easy access.

For Excel users, it can replace p1ts-csv eliminating the dependency on additional program (p1ts-csv.exe) and its artifacts (CSV files). Its column names are compatible with those of p1ts-csv.

1. Install

General-use Office Add-ins are usually obtained from the Store. While we may publish P1TS Data to the Store in the future, for now we must perform these setup steps:

1.1. Download & Share P1TS Data Manifest file

Excel reads our manifest-localhost.xml manifest file to find where to get the P1TS Data add-in (it is on your PC that is running both Excel an your P1TS server). Excel requires that the manifest's folder be a shared folder that we have been explicitly given access.

  1. Make a folder named OfficeAppManifests under C:\P1Software, where you installed P1TS. Use File Explorer to create the new folder.
  2. Make OfficeAppManifests a shared folder. Using File Explorer:
    1. Right click the C:\P1Software\OfficeAppManifests folder
    2. Give access to / Specific People... then Add your name. You may need to Show more options to see Give access to choice.
    3. Remember or copy the name of this shared folder. In our case, our computer is named P1SOFTWARE-PC1, so it is this name:
      \\P1SOFTWARE-PC1\OfficeAppManifests
  3. Download manifest-localhost.xml into the shared folder.
    1. Make sure your P1TS server is running so it can serve up the manifest file. Then in your web browser open this link to the manifest file.
      http://localhost/p1imsa/p1ts-excel-addin/OfficeAppManifests/manifest-localhost.xml
    2. Download or Save (may be under the ⋮ menu) the displayed manifest-localhost.xml page to the C:\P1Software\OfficeAppManifests shared folder that you created above.

Your manifest-localhost.xml file should appear as follows in File Explorer in the shared C:\P1Software\OfficeAppManifests folder.
Manifest in File Explorer

While there will be future updates to the P1TS Data add-in (delivered via your P1TS server), we generally do not anticipate that you will need to repeat these P1TS Add-In Setup steps in the future.

localhost - In computer networking, localhost is a hostname that refers to the current computer used to access it (i.e., your PC).

If you are running both your P1TS server and webapp (e.g., Strat 1) on the same computer, you can type localhost in your browser's address bar instead of its numeric IP address.

Our manifest explicitly labels our add-in P1TS Data (localhost) to emphasize the add-in is obtained from the P1TS server on our localhost PC. In the future if the add-in is published in the Microsoft Store it would need a different manifest - we would then not include (localhost) in its label.

1.2. Install P1TS Add-In into Excel

Perform these steps to install the P1TS Data add-in into Excel

  1. Add Network Share to Excel's Trust Center:
    1. From the ribbon navigate to File > Options > Trust Center. Click Trust Center Settings...
    2. Click Trusted Add-in Catalogs
    3. In the Catalog Url field, enter the earlier shared folder (step 1.1.2.3.) containing the manifest file: \\P1SOFTWARE-PC1\OfficeAppManifests
    4. Under the Trusted Catalogs Table section click Add Catalog
    5. Click Show in Menu / OK and restart Excel.
  2. Insert Add-in into Excel:
    1. From the ribbon navigate to Home > Add-ins (red below) > Get Add-ins > Shared Folder
    2. Add P1TS Data (localhost). This will appear in the Home ribbon, as seen in the blue highlight in the P1TS Data Use screenshot below.

1.3. Updating P1TS Add-In in Excel

You will be notified, usually via email, when the P1TS Data add-in has received new software updates (reflected in its version number). To load any new software updates follow these steps, which can be executed at any time.

  1. Click anywhere inside the P1TS Data task pane.
  2. Press Ctrl-F5 in this pane to reload P1TS Data add-in

1.4. Clearing P1TS Add-In from Excel

If for some reason you want to remove the P1TS Data add-in from Excel, clear the Office cache on Windows:

  1. From the ribbon navigate to File > Options > Trust Center > Trust Center Settings > Trusted Add-in Catalogs.
  2. Select the checkbox Next time Office starts, clear all previously-started web add-ins cache.

2. Run

2.1. Running P1TS Data

Taskpane

In your workbook's Home ribbon you should now see P1TS Data (localhost) (blue). When clicked, the task pane on the right will appear.

When data is refreshed, only the tables that are enabled will be refreshed (green). The tables reside in worksheets that are automatically created with the same name.

3. Tables

P1TS data is written to Excel tables instead of simple cell ranges. This allows you to use structured references instead of cell addresses. We'll see in Examples how they might be used. Here are some notes about the data and cell values.

3.1. P1.Leaderboard Table

The P1.Leaderboard table's rows contain the current information about each car, commonly displayed in leaderboards. The rows are ordered by overall position.

P1.Leaderboard

The following describes each of the columns in the P1.Laps table. The columns names are all short, lower-cased identifiers.

ColTypeDefinition
pNumberOverall position at lap completion
cpNumberClass position at lap completion
cTextCar number (this is Text so 1 and 01 can be handled)
cldTextCar class description (e.g., GTD)
vehTextVehicle description
lNumberCompleted lap number
ltNumberLap time in milliseconds
ttNumberSession time in millseconds at lap completion
blNumberBest Lap Number
btNumberBest Lap Time (ms)
xnTextLast crossing number (per IMSA)
xmTextLast crossing name (per IMSA)
s01NumberSector 1 time in milliseconds
s02NumberSector 2 time in milliseconds
s03NumberSector 3 time in milliseconds

3.2. P1.Laps Table

The P1.Laps table contains detailed lap information about the Hero Car, one row per lap. This table may be expanded in the future to include sister cars and follow cars, but for now it is limited to the Hero Car.

P1.Laps

The following describes each of the columns in the P1.Laps table. The columns names are all short, lower-cased identifiers.

ColTypeDefinition
lNumberCompleted lap number. Guaranteed to be the first column, to facilitate Excel VLOOKUP by lap number.
cTextCar number (this is Text so 1 and 01 can be handled)
cldTextCar class description (e.g., GTD)
vehTextVehicle description
fFlag at lap completion
  • Green - Green flag
  • Yellow - Yellow flag
  • Red - Red flag
  • Finish - Finish flag
  • (empty) - No active session
fnTextDriver first name
lnTextDriver last name
pNumberOverall position at lap completion
cpNumberClass position at lap completion
ltNumberLap time in milliseconds
ttNumberSession time in millseconds at lap completion
pitBooleanTRUE if car was in pit lane on this lap, FALSE otherwise
spaNumberSpeed trap A's MPH x 1000 (176713 = 176.713 mph) or #N/A
spbNumberSpeed trap B's MPH x 1000 or #N/A
s01NumberSector 1 time in milliseconds
s02NumberSector 2 time in milliseconds
s03NumberSector 3 time in milliseconds

3.3. P1.MRLapTimes

The P1.MRLapTimes table contains each car's most recent 50 lap times arranged in a column making it easy to insert into an Excel multi line chart for study.

P1.MRLapTimes worksheet

The lap times are the same as the most recent 50 values for the car appearing in P1.Laps[lt].

4. Examples

These examples are provided to illustrate how you might possibly use the tables in your proprietary strategy calculations.

4.0 #REF! Notes

WARNING: Since your personal sheet contains references to the P1TS Data tables, we remind you that Excel will mangle your formulas with #REF! errors should the structured references become invalid.

4.1. My.Leaderboard (TBD)

TBD

4.2. My.RunSheet (generated)

The My.RunSheet worksheet is generated by clicking on Examples ˅ in the lower right. It is pictured below with Ctrl+G pressed, showing the maintained tables in the Go To dialog.

My Run Sheet worksheet

This worksheet shows some possible ways of using the P1.Laps table. Since P1.Laps is an Excel table, rather than a simple range, one can use structured references (e.g., P1.Laps[l] for the completed laps column) to more easily refer to P1.Laps table's columns.

LabelCellContentCol Format
LapsA5=P1.Laps[l]General
CPB5=P1.Laps[cp]General
FlagC5=P1.Laps[f]General
NameD5=BYROW(P1.Laps[fn]:P1.Laps[ln], LAMBDA(a, TEXTJOIN(\" \", TRUE, a)))General
Lap TimeE5=P1.Laps[lt]/86400000Custom m:ss.000
PitF5=P1.Laps[pit]Custom m:ss.000
S01 TimeG5=P1.Laps[s01]/86400000Custom m:ss.000
S02 TimeH5=P1.Laps[s02]/86400000Custom m:ss.000
S03 TimeI5=P1.Laps[s03]/86400000Custom h:mm:ss.000
Tot TimeJ5=P1.Laps[tt]/86400000Custom h:mm:ss.000

Name - uses Excel's BYROW to pass the row values in the P1.Laps table's fn and ln columns to TEXTJOIN to create a full name.

4.3 My.Recent Lap Times Sheet (manual)

The My Recent Lap Times worksheet shows how one might study the 50 most recent lap times of hero car 1 and follow cars 66 and 77 to possibly study degradation. It references the P1.MRLapTimes table.

My Recent Lap Times worksheet

This sheet was manually created by using these steps:

  1. Create a new sheet.
  2. Create the following cells. Divide the lap times by 1000 to convert milliseconds to seconds.

    CellContent CellContent
    A1'1A2=P1.MRLapTimes['1]/1000
    B1'66B2=P1.MRLapTimes['66]/1000
    C1'77C2=P1.MRLapTimes['77]/1000

  3. Select the 3 columns with headers and 50 rows of data, A1:C51.
  4. Insert > Recommended Charts and chose the line chart. See Microsoft's Create a chart from start to finish.
  5. Format Axis... was used to change the minimum and maximum bound