MS Excel outputs setup

Configuration for running Excel

As of version 6.2, MS Excel format renderings become possible when running Vigilens from a web browser or from a task scheduler. (Previously, the file generated and opened by MS Excel was in CSV format).

The use of “Excel file” output type requires the execution of Excel via DCOM.

Since version 7.5, it is possible to generate “Excel file” type restitutions without using the MS Excel application. To do this, you must choose to generate a document of the Excel 2007 Workbook type (without specifying a macro or requesting the updating of fields after data insertion).

By default, DCOM is configured so that Excel is launched by the executing user. However, this is a problem when the call to Excel is made from a Windows service (case of the Vigilens Web interface) or from the task scheduler.

In these two cases, it is advisable to modify the configuration of Excel for the machine in question as specified below.

When Excel output is triggered by Vigilens Web interface or Task Scheduler, Excel is launched without its graphical interface being displayed. In order to avoid any risk of blocking the process, make sure that no dialog box will be displayed (Example: “Tips” box, Office account settings box, document recovery panel).

Without changing the DCOM settings

This setup is not documented by Microsoft

However, from our experience, it is functional and has the advantage of allowing MS Excel output in all cases, without having to modify the DCOM configuration for Excel :

  • whether there is an active Windows session or not on the server where Vigilens Web is installed (or on the computer/server where the scheduled requests are executed).
  • In Web mode as in Windows mode (Vigilens Designer)

To set up this solution, simply create (if it does not already exist) the following directory : C:\Windows\System32\config\systemprofile\Desktop

On a 64-bit machine, it may be necessary to create the following directory: C:\Windows\SysWOW64\config\systemprofile\Desktop

This solution also avoids a number of problems related to the use of macros in Excel templates.

Changing the DCOM settings

For a given user

This option has the advantage of allowing MS Excel reports even when no Windows session is active on the server where Vigilens Web is installed or on the computer/server where the scheduled requests are executed.

This configuration is incompatible with the use of this machine for MS Excel format renderings from Vigilens Designer (only in web or scheduled mode).

How to proceed:

  • Run the DCOM configuration tool.
    • “DCOMCNFG.EXE” if you have 32-bit MS Excel on a 32-bit MS Windows system or 64-bit MS Excel on a 64-bit MS Windows system.
    • in the case of 32-bit MS Excel on a 64-bit MS Windows system, run “MMC comexp.msc /32”.
  • Under “Component Services - Computers - My Computer - DCOM Config” select the “Microsoft Excel Application” line.
  • In the “Action” menu, click “Property”.
  • In the properties box, select the “ Identity ” tab, tick “ This user ” and specify a Windows user account (preferably the one associated with the Vigilens web service or with the execution of the scheduled task, which will ensure that the execution rights are homogeneous).

  • In the “Location” tab, make sure that “Run the application on this computer” is checked.

  • In the “Security” tab, check “Customize” and click “Edit”. The Windows user account previously selected must have all execution and activation permissions, local access permissions, and all configuration permissions.

  • validate dialog box

Interactive user

The use of the interactive user to launch Excel requires that he always has an active session on the server where Vigilens Web is installed (preferably that of the user associated to the “Vigilens Web” service in order to avoid possible access right problems) or on the workstation/server executing the scheduled requests (preferably that of the user associated to the scheduled task in order to avoid possible access right problems).

This is the operating mode recommended and supported by Microsoft.

How to proceed:

  • Run the DCOM configuration tool.
    • “DCOMCNFG.EXE” if you have 32-bit MS Excel on a 32-bit MS Windows system or 64-bit MS Excel on a 64-bit MS Windows system.
    • in the case of 32-bit MS Excel on a 64-bit MS Windows system, run “MMC comexp.msc /32”.
  • Under “Component Services - Computers - Workstation - DCOM Configuration” select the “Microsoft Excel Application” line.
  • In the “Action” menu, click “Property”.
  • In the properties box, select the “Identity” tab.
  • Select “The interactive user”.
  • Validate the properties box

Rights management

The execution of Excel by the interactive user in web or scheduled mode is done through a system user account. The Excel functionalities implemented for the creation or update of a file requires the use of the temporary directory (that of the system consequently). By default, this directory is set to “C:\windows\TEMP”. It is, therefore, necessary that this directory be accessible in read and write mode to the user associated with the Vigilens Web service or the execution of the scheduled task.

To know the directory defined on your system, you need to access the environment variables.

Two alternatives are possible:

  • Giving the rights to this directory to users profiles
  • Modify the system variables TEMP and TMP so that they use a directory that is already accessible by users profiles.