Views:

How to fix NAV not Launching due to Excel paths


This process is best handled by an IT or administrator of your business. The steps for both are the same, provided below are the two versions of office available based off whether 32-bit or 64-bit is installed with the only difference being the default path. Some environments may have a different path than the ones provided.
A typical Event viewer entry would include a NullReferenceException with the callstack referencing WInClientExcel, for example:


Application: Microsoft.Dynamics.Nav.Client.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.FindMajorVersion(Microsoft.Win32.RegistryKey)
   at Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.<.ctor>b__8_0(Microsoft.Win32.RegistryKey)
   at Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.FindRegistryKey(Microsoft.Win32.RegistryHive, System.String, System.Action`1<Microsoft.Win32.RegistryKey>)
   at Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.FindFirstRegistryKey(System.String, System.Action`1<Microsoft.Win32.RegistryKey>)
   at Microsoft.Dynamics.Nav.Client.WinClientExcelExportService..ctor(Microsoft.Dynamics.Framework.UI.UISession)
   at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession+<>c.<AddServices>b__22_6(Microsoft.Dynamics.Framework.UI.UISession)
   at Microsoft.Dynamics.Framework.UI.ClientSessionCore.AddUIService(System.Func`2<Microsoft.Dynamics.Framework.UI.UISession,Microsoft.Dynamics.Framework.UI.IUIService>)
   at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.AddServices()
   at Microsoft.Dynamics.Framework.UI.ClientSessionCore.Prepare()
   at Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.SetupClientSession()
   at Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.RunCore()
   at Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.Run(Boolean)
   at Microsoft.Dynamics.Nav.Client.Program.Main(System.String[])


 

For 32-bit versions of Office:

  1. Run Registry Editor, use the administrator elevation if necessary for your environment.
  2. Navigate to the following key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\excel.exe
    1. Click the ‘>’ value next to HKEY_LOCAL_MACHINE to expand it.
      Graphical user interface, text, application<br><br>Description automatically generated
    2. Expand Software.
      Text<br><br>Description automatically generated
    3. Scroll down and expand Microsoft.

    1. Scroll down and expand Windows.
    2. Expand Current Version.
    3. Expand App Paths.
    4. Click the excel.exe folder.
  1. Right Click the Default value in the right panel and click Modify.
  2. In the pop-up paste the path to the excel.exe application from your file system.
  3. Default installation: C:\Program Files (x86)\Microsoft Office\root\Office16\excel.exe
    Graphical user interface, text, application<br><br>Description automatically generated
  4. If your system has a record for Path, repeat step 3 and 4 for the path entry. You may also add the value by right clicking and choosing New > String Value:
  5. Set the name to Path and then repeat step 3 and 4 to set the value.
    Graphical user interface, application<br><br>Description automatically generated

For 64-bit versions of Office:

  1. Run Registry Editor, use the administrator elevation if necessary for your environment.
  2. Navigate to the following key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\excel.exe
    1. Click the ‘>’ value next to HKEY_LOCAL_MACHINE to expand it.
      Graphical user interface, text, application<br><br>Description automatically generated
    2. Expand Software.
      Text<br><br>Description automatically generated
    3. Scroll down and expand Microsoft.

    1. Scroll down and expand Windows.
    2. Expand Current Version.
    3. Expand App Paths.
    4. Click the excel.exe folder.
  1. Right Click the Default value in the right panel and click Modify.
    Graphical user interface, text, application<br><br>Description automatically generated
  2. In the pop-up paste the path to the excel.exe application from your file system.
  3. Default installation: C:\Program Files\Microsoft Office\root\Office16\excel.exe
    Graphical user interface, text, application<br><br>Description automatically generated
  4. If your system has a record for Path, repeat step 3 and 4 for the path entry. You may also add the value by right clicking and choosing New > String Value:
    Graphical user interface, text, application<br><br>Description automatically generated
  5. Set the name to Path and then repeat step 3 and 4 to set the value.
    Graphical user interface, application<br><br>Description automatically generated