Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
this is a very weird situation.
I have a simple script to export a csv file that is called when OnPostReload event is fired.
Sub ExportToCSV
set sObject1 = ActiveDocument.GetSheetObject("ClientiUnivoci")
sObject1.Export "Output\ClientiUnivoci_Week_" & Year(Now()) & LPad(Month(Now()),"0",2 ) & LPad(Day(Now()),"0",2 ) & ".csv", ";", 65001
End Sub
When I launch reload inside qlikview the script works fine and the file is generated, when I lanch qlikview reload from a batch file using the following command:
"C:\Program Files\QlikView\Qv.exe" /r "C:\Qlikview\Project\LastWeek.qvw"
the qlikview file is reload but the macro is not executed and the csv file is not generated.
I made the following attemps without success:
I don't really know what to do more.
Do you have any ideas?
Thanks in advance.
Nicola
Mostly it are the small things ...
Hi Nicola,
I guess, you can execute through windows batch file. Btw, do you have QV server?
Execute cmd.exe /C C:\BatFiles\Example.bat
Regards,
Sreeni
I'm already using a Windows bat file.
The bat file contains the following code:
"C:\Program Files\QlikView\Qv.exe" /r "C:\Qlikview\Project\LastWeek.qvw"
When I run the bat file qlikview reloads correctly but the macro is not executed.
I don't have QV server.
Thanks.
Hi Nicola,
Your windows bat file script is correct..
cd "C:\Program Files\Qlikview\Qv.exe" /r "C:\Qlikview\Project\LastWeek.qvw"
I wondering, is there any service that is down causing the issue.. Can you please check the services in Control panel?
Regards,
Sreeni
Hi Sreeni, first of all thanks for your help.
I don't believe it's a problem of services, I copied the qlikview file on another machine and the issue remains exactly the same. Furthermore on the same machine I have lot of other qvw files that work in the same manner called by a batch file. So I don't really understand where the problem could be. If I'll find out a solution I will post it,
any other idea is appreciated.
Thanks a lot.
Nicola
Make a try with /l as parameter:
"C:\Program Files\QlikView\Qv.exe" /l "C:\Qlikview\Project\LastWeek.qvw"
- Marcus
Done. The QV file remains open but the macro in not executed.
Thanks
Check this too: Settings | User preferences | Security -> All checked except Confirm Launch from Macro
Nothing to do.
Thanks the same Marcus.
But in general this approach worked - I do the same since years. How do you execute the batch - as normal windows user which clicked on the batch within the explorer quite similar you open the qvw itself to start the reload or is this different from them?