The Execute statement is used to run other programs while QlikView is loading data. For example, to make conversions that are necessary.
A text that can be interpreted by the operating system as a command line.
Enable Execute in QlikView
By default, execution of Execute statements during reload is disabled both in QlikView Server and QlikView Desktop. You can manually enable the Execute command in QlikView Server or QlikView Desktop installations.
You can enable Execute statements for QlikView Server by modifying the QlikView Batch Settings.ini file.
Do the following:
- Navigate to C:\Windows\System32\config\systemprofile\AppData\Roaming\QlikTech\QlikViewBatch and open the Settings.ini file.
- Locate the line AllowExecuteCommand and set the value to 1 as shown below:
Now, when running the reload of the document from the QlikView Management Console, Execute statements are enabled.
Do the following:
- On QlikView Desktop Start Page, click the Settings drop-down menu and select Users Preferences...
- On the Security tab, select Script (Allow Database Write and Execute Statements) to enable the security override.
See: User Preferences: Security
- Open the QlikView document in which you want to perform the Execute statement, and open the Script Editor by selecting Edit Script... from the File drop-down menu.
- In the lower part of the Script Editor window, go to the Settings tab and select Can Execute External Programs.
Now, you can execute a statement in the script during reload.
It is possible to execute a statement during reload also if the setting Can Execute External Programs is not enabled in the Script Editor Settings. In this case, a Security Alert window appears every time you run a script containing an Execute statement. To allow the script to run the Execute statement, select Override Security, Execute This Statement from the options provided in the Security Alert window.
Execute "C:\Program Files\Office12\Excel.exe";
Execute "winword macro.doc";
Execute cmd.exe /C "C:\BatFiles\Log.bat";