Submitting your feedback...
Knowledge Base Article
KB00265 - PI DataLink Ribbon does not appear in Excel
Product: PI DataLink
Version(s): 4.0.3+
  
st-widget-{image: YouTube_Icon.jpg}OSIsoft: PI DataLink Ribbon Does Not Appear in Excel

Issue

After installing PI DataLink, the PI DataLink tab in the Office Ribbon does not appear.

st-widget-{image: Excel 2016 DL tab in ribbon.png}
PI DataLink Ribbon in Excel 2016

Case 1 Symptoms

  • The PI DataLink Excel add-in (OSIsoft.pipc32.xll) may be listed in the Active Application Add-Ins list, but the COM add-in (OSIsoft.PIDatalink.UI.vsto|vstolocal) is not (see Notes).
  • In the dialog to manage COM add-ins, the check box for the PI DataLink add-in is unchecked.
  • The PI DataLink tab is not added after checking the box and clicking OK.
  • When you reopen the COM add-ins dialog, the box is still unchecked.
  • The PI DataLink tab only appears in the ribbon when running Excel as an administrator.

Case 2 Symptoms

  • The PI DataLink tab does not appear on the Office Ribbon immediately after installing PI DataLink.  This case does not apply to Office 2007.
  • Neither the PI DataLink Excel add-in (OSIsoft.pipc32.xll) nor the COM add-in (OSIsoft.PIDatalink.UI.vsto|vstolocal) COM add-in are listed in the Active Application Add-Ins list (see  Notes).

Case 3 Symptoms

  • The PI DataLink Excel add-in (OSIsoft.pipc32.xll) may be listed in the Active Application Add-Ins list, but the COM add-in (OSIsoft.PIDatalink.UI.vsto|vstolocal) is not (see  Notes).
  • In the dialog to manage COM add-ins, PI DataLink add-in is not present.

Case 4 Symptoms

  • PI DataLink 2010 (version 4.x) is installed
  • Microsoft Visual Studio 2012+ or Office 2013+ is installed
  • You may see the following error when trying to enable the PI DataLink COM add-in:
Not loaded. A runtime error occurred during the loading of the COM Add-in.

Case 5 Symptoms

If you are having trouble with loading the PI DataLink ribbon and none of the above cases apply, please follow KB01717 to use the Windows environment variable VSTO_SUPPRESSDISPLAYALERTS to show additional error messages which may narrow down the root cause of your issue.

Case 6 Symptoms

Recently there have been numerous cases with Microsoft 365/ClicktoRun and Datalink 2014 and onwards. The error message that you see is similar to case 4  "Not loaded. A runtime error occurred during the loading of the COM Add-in." You may also see "Not a valid Office-Add In" when you try to load the COM add-in.

Solution

The Solutions for the different cases are noted in the text below. These same solutions are also in the OSIsoft YouTube Video:

st-widget-{image: YouTube_Icon.jpg}OSIsoft: PI DataLink Ribbon Does Not Appear in Excel
 

Case 1 Solution

To verify and correct the problem in Excel 2007 and later :
  1. Click on the Office 2007 button (or File tab in Office 2010 and 2013) in the upper left corner.
  2. Choose "Excel Options."
  3. Select Add-ins> Manage "Disabled Items" > Go...
If PI DataLink (OSIsoft.PIDataLink.UI.dll.manifest) is disabled, enable it and then continue with the following:
  1. Choose to Add-ins> Manage "COM Add-Ins"> Go...
  2. Select the Check box beside PI DataLink and click "OK."
In this case, check the registry key at HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\AddIns\PI DataLink. The LoadBehavior DWORD should be set to 3. For more information, refer to Microsoft MSDN library Registry Entries for VSTO Add-ins.

If the PI DataLink tab still does not appear in the Ribbon, please follow KB01717 to use the Windows environment variable VSTO_SUPPRESSDISPLAYALERTS to show additional error messages.

Case 2 Solution

VSTO Add-ins such as PI DataLink use the LoadBehavior registry key to specify the run time behavior of the Add-in.  If PI DataLink is not loading, the LoadBehavior may not be set to 3 (Loaded/ Load at Startup) for PI DataLink, in which case the Add-in will not be loaded as expected.  Please see KB00602 for details.  It contains specific locations for the registry keys based on the versions of PI DataLink, the Operating System, and Microsoft Office, as well as examples of correct values.

Alternatively, under certain conditions, the Office 2010 Primary Interop Assembly (PIA) required by PI DataLink does not get installed during the original Office 2010 installation. The reason is that the PIA only gets installed with Office 2010 if the .NET Framework exists on the operating system prior to Office 2010 installation. The conditions/caveats for this issue are as follows:
  • The PIA issue does apply if PI DataLink is installed on Office 2010.
  • The PIA issue does not apply if PI DataLink installation has ever worked previously on the computer or if PI DataLink 2013+ is used.
  • The PIA issue should not occur with Windows 7 since it comes installed with .NET Framework 3.5 SP1 by default.
  • Similar symptoms will occur if you are using 64-bit Office 2010 which is not supported by PI DataLink 2010. Verify that 32-bit Office 2010 is being used by selecting the File Tab, choosing "Help", and checking under "About Microsoft Excel".

To check whether the Office 2010 PIA is installed

  1. Navigate to the Open the Windows Add/Remove Programs (or Program and Features on Windows Server 2008, Windows 7 and Vista) applet in the control panel.
  2. Select Microsoft Office 2010 and choose Change.

    st-widget-{image: AddorRemoveMSOffice2010.png}
    Figure 1: Add/Remove Programs or Programs and Features Control Panel applet
  1. Select the Add or Remove Features radio button and click Continue. The Installation Options shown in Figure 2 shown below will appear.
  2. Click on the plus "+" button next to Microsoft Excel.

    If there is a red X on the .NET Programmability Support option from Microsoft Excel, then the Office PIA was not successfully installed.

    st-widget-{image: Office2010_figure1.jpg}
    Figure 2: Microsoft Office 2010 Add or Remove Features Panel

To install the PIA

  1. Click on the .NET Programmability Support, and select Run from My Computer
  2. Press Continue, and wait while the new feature is added.

    After the Office 2010 PIA has been added, you need to enable the PI DataLink COM Add-in and Excel Add-in.
  1. Select File> Options then click Add-ins.
  2. Select COM Add-Ins from the Manage drop-down menu at the bottom of the dialog, and press Go (Figure 3).

    st-widget-{image: Office2010_figure2.jpg}
    Figure 3: COM Add-in from Manage Drop-Down menu

    The COM add-ins manager will appear (Figure 4).
  1. Enable the PI DataLink Add-ins by checking them and clicking OK.

    st-widget-{image: Office2010_figure3.jpg}
    Figure 4: COM Add-ins Manager

    The PI DataLink Notifications add-in will only be present if you have installed PI Notifications. If the PI DataLink COM add-in is not present in the COM add-in manager, then follow the instructions from Case 1 to remove it from the disabled items list.

    The PI Ribbon should now be visible.

To enable the Excel Add-in(s)

  1. Open the Add-in Manager (select File> Options then click Add-ins) and select Excel Add-Ins from the drop-down menu and press Go (Figure 5).

    st-widget-{image: Office2010_figure4.jpg}
    Figure 5: Excel Add-ins from Manage Drop-Down menu

    The Excel Add-ins manager should appear (Figure 6).
  1. Enable the PI DataLink Excel add-in(s) (if not already enabled) them by checking the boxes next to them. (The PI DataLink Notifications add-in will only be present if you have installed PI Notifications.)

st-widget-{image: Office2010_figure5.jpg}
Figure 6: Excel Add-ins Manager
 

  1. Click OK.

    Your PI DataLink Ribbon should now be fully functional. Please contact Tech Support if you continue to have problems.

Case 3 solution

Check the registry (run Regedit) for keys named “PI DataLink” in the locations described in KB00602. Note that DataLink 4.x and 5.x write the installation keys to different locations.

Given that the DataLink keys could exist in multiple locations, one should do a Search in Regedit for "Excel" and/or "PI DataLink". The HKEY_LOCAL_MACHINE entry is created at install time and the HKEY_CURRENT_USER entry is created when the current user first opens Excel. In either case, it is possible that registry permissions have been restricted such that these entries cannot be created. If either entry is missing, first try reinstalling PI DataLink. Be sure to run the install kit as a local administrator user, and check that that user has the permissions to create those registry keys.

Here is a Microsoft Article that explains why the DWORD should be 3: https://msdn.microsoft.com/en-us/library/bb386106.aspx.

If this does not resolve the problem, please contact OSIsoft Technical Support and we will assist you in creating the registry entries.

Case 4 solution

Visual Studio 2012+ and Office 2013+ install a version of Visual Studio Tools for Office that causes problems with PI DataLink 2010. Installing Microsoft Visual Studio 2010 Tools for Office Runtime resolves the issue.  Upgrade to the latest version of PI DataLink which includes it (2013 or later), or use the standalone download from Microsoft.

Case 5 solution

Case 5 is a troubleshooting step rather than an actual problem. The solution will vary based on the information gathered by this step. For instance, the example screenshot provided for Case 5 mentions "The system cannot find the file specified.", in which case one may want to check if all of the files provided by the installation kit are correctly installed.

Case 6 solution

Check value of the (Default) and LoadBehavior registry keys along this path using the Registry Editor (regedit):
 
HKLM\SOFTWARE\Microsoft\Office\Excel\AddIns\PI DataLink

Note that for a Click-To-Run Office installation, the keys of interest will be located in the ClickToRun hive instead.  In that case, check

HKLM\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\Excel\Addins\PI DataLink

for Office 2016, and ...\Office\15.0\... or ...\Office\14.0\... for Office 2013 or 2010, respectively. For a 64-bit installation of Office or a 32-bit Operating System, omit the Wow6432Node\ portion from the path.

The LoadBehavior key should have type REG_DWORD, and a value of 0x00000003 (3). 

The (Default) key should have a type of REG_SZ (string).  If the key instead has an invalid type such as 0x50000, delete the key and restart Excel:
st-widget-{image: default reg key bad.png}

At this point, the PI DataLink tab should appear in the ribbon.  Refresh the Registry Editor (F5 or View > Refresh), and you should see that the key has been regenerated by Excel, this time with the correct type of REG_SZ:
st-widget-{image: default reg key good.png}
 

Notes

In PI DataLink 4.x, OSIsoft.pipc32.xll is an Excel Add-in that controls the communication with the PI Data Archive. In PI DataLink 5.x, this functionality is integrated into the COM Add-in.  Thus, a reference to the Excel Add-in is no longer necessary, and a lack of reference to the Excel Add-in is not indicative of a problem.

OSIsoft.PIDatalink.UI.dll.manifest is a COM Add-in, which is responsible for configuring the ribbon functionality in Excel.

If the PI DataLink COM Add-in was manually removed from the list of COM Add-ins in Excel, you must repair the PI DataLink install to add it back. The COM Add-in cannot be manually added back.

If Microsoft Excel crashes, when it comes back up it may suggest that you disable the add-in that may have caused the crash. Excel sometimes identifies this add-in as a potential crash-causer, and it is normal for users to click "Yes" on a pop-up box without really reading what it is asking.
 
Article ID: KB00265 Created: 2009-04-06
Article Type: Troubleshooting Last Updated: 2018-11-19