A call to Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.WorkbookWriter.Create failed

I was using the function Export to Excel from the Config. Package Card in Microsoft Dynamics NAV 2017 when I’ve received the following error message:

A call to Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.WorkbookWriter.Create failed with this message:
Could not load file or assembly ‘DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.

A call to Microsoft.Dynamics.Nav.OpenXml.Spreadsheet.WorkbookWriter.Create failed with this message:
Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Cause:
Probably Open XML SDK 2.5 for Microsoft Office has not been installed on your computer.

Solution:
Close Excel.
Install Open XML SDK 2.5 for Microsoft Office from Microsoft Dynamics NAV DVD, the installation file is under

Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\

Restart NAV Service after the installation.

Did my solution solve your problem? Leave a reply.

HOW TO change version from Visual Studio 2015 Enterprise to Professional

You must uninstall the installed version to install the new one. The two version cannot be installed in the same machine, when you run the Installation of Visual Studio 2015 Professional the installation stops because another version is already installed.

I suggest you, before to uninstall, to navigate to the Windows Control Panel to modify existing installation so that you can take note of the components/features installed.

Did my HOW TO help you? Leave a reply.

the process may not have access rights for the private key

I’m changing a NAV Instance to use a new certificate but the service fails to run, looking at the Event Viewer I can find the following error message:
The service <ServiceName> failed to start. This could be caused by a configuration error. Detailed error information: System.ArgumentException: It is likely that certificate ‘<CertificateSubject>’ may not have a private key that is capable of key exchange or the process may not have access rights for the private key.

Solution:
Run MMC, click on File -> Add/Remove Snap-in…, then add Certificates, selecting Computer Account and Local Computer
NOTE: Identify the relevant certificate and verify that a small yellow key is shown in the icon, if not it means you don’t have the private key for this certificate so you need to import the certificate with the Private Key.
Right-click on the certificate then select All Tasks -> Manage Private Keys
Click Add in the permissions window
Add the Service Account that run the NAV Service (in my case it was “Network Service”).

Did my solution solve your problem? Leave a reply.

The email address “” is not valid.

A Job Queue Entry running the Codeunit 1509 Notification Entry Dispatcher fails with the following error message:

The email address “” is not valid.

Cause:
The User ID that runs the Job Queue Entry does not exist in the User Setup or it has blank email address.

Solution:
Verify that the User ID that runs the Job Queue Entry exists in the User Setup table, if not create it, then populate the E-Mail field.

Did my solution solve your problem? Leave a reply.

There are some objects locked in the database. You must unlock these objects before upgrading the database

—————————
Microsoft Dynamics NAV Development Environment
—————————
There are some objects locked in the database. You must unlock these objects before upgrading the database.
—————————
OK
—————————

Solution:
Execute the following SQL Query, remind to USE your database name (replace NAVDatabase)

USE [NAVDatabase]

UPDATE [Object] SET [Locked] = 0, [Locked By] = '' WHERE [Locked] = 1

then close the query window (otherwise the connection will still remain active).

Did my solution solve your problem? Leave a reply.

Cannot access a disposed object. Object name: ‘NavSystemTenant’

I’ve created a new NAV Instance, setup the correct database name then tried to run the Service and I’ve received the following error message:

Error
—————————

ServerInstance ‘MicrosoftDynamicsNavServer$NewInstance’ failed to reach status ‘Running’ on this server due to the following error: ‘Cannot start the service.’. Additional information may be in the event log of the server.
—————————

OK
—————————

As suggested by the error message I’ve opened the Event Log to look for additional information and I’ve found the following error message:

Cannot access a disposed object. Object name: ‘NavSystemTenant’.

What does this error mean? Well the error message does not help us to fix this issue but I’ve found a solution and I’m here to share it with you (this is the mission of my website, share my solutions).

Cause:
The new instance is setup to use a port (Management Services Port, Client Services Port, SOAP Services Port or OData Services Port) that is already in use by an existing running NAV Instance. In my case was the SOAP Services Port.

Solution:
Change the port number to a one which is not being used by any other instance, or stop the other service using this port.

Did my solution fix your issue? Leave a comment.