Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Help on EXECUTE command


Hi Friends,

I wanted to know the logic and functionality of EXECUTE command. Looking into the Help, I am tring to Execute a Excel File like below:

  EXECUTE C:\MyFiles\QlikView Documents\SalesData.exe;

First its asks with a Prompt like this:

EXECUTE issue.png

Finally its failing with and error: The EXECUTE statement requires the Execute flag to be set for the script.

How to deal with these? Could you please help me in explaining the  Logic and Way to work with EXECUTE command?

Regards!!!

10 Replies
Clever_Anjos
Employee
Employee

Mark that check to enable running external programs

Capturar.PNG.png

srchilukoori
Specialist
Specialist

check the "Can execute external programs" in the script editor.can execute external programs.png

dmohanty
Partner - Specialist
Partner - Specialist
Author

I see...Thanks...Now its not asking for any prompt!!!

But still its failing due to Syntax issue. What could be it?

EXECUTE C:\MyFiles\QlikView Documents\SalesData.exe;

SalesData is stored in an Excel File.

Regards!!!

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi,

Infact my requirement is like this:

I have a Excel Sheet in some shared folder. I have to COPY it to my Local folder and use that Excel in QlikView.

So what would be the syntax to write the EXECUTE command in QlikView to COPY from one location to another?

srchilukoori
Specialist
Specialist

create a batch file and use the following syntax

Execute "<absolute path to bat file>\<Filename>.bat"

abeyphilip
Creator II
Creator II

Hi,

Does the command work fine if you run it explicitly from the cmd prompt?

See if this helps:

EXECUTE cmd.exe /C COPY /Y "\\<IP Address>\c$\Qlikview\SourceDir\ABC.xls" "C:\QlikView\TargetDir\"

This will copy ABC.xls from c:\Qlikview\SourceDir on server with IP address - <IP Address> to C:\QlikView\TargetDir\ of your local system.

Regards,

Abey

shree909
Partner - Specialist II
Partner - Specialist II

Hi,

i know that when u  check the  " can execute external programs"

u will not get that error , but when u close the application or move to other place then it will start complaining.

So what u need to do is go to  Settings-->User Preferences-->Security--> then check the option

"Script( Allow database  write and execute statements") this will fix the problem forever..

Use  EXECUTE cmd.exe /c MOVE  " soure folder path"  "Destination Folder path"

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Abey/Shree,

I have not tested in CMD.

Is it required to create Batch file for that? How to test in CMD? The same same above command will work?

Regards!!!

abeyphilip
Creator II
Creator II

Hi,

Yes - you don't need a batch for this. You can include that line directly in your load script. Only change the path to your requirement.

Regards,

Abey