5 Replies Latest reply: May 17, 2013 8:12 AM by Bill Britt RSS

    Reload qvw to execute macro for csv export using .bat file

    Scott Hay

      Hi all

       

      I am trying to do a simple expect of a table into a csv file. This extract needs to be done on reloading the QVW. Having read through the other posts I know that publisher requires the QVW to be reloaded via a .bat file as the macro will not run in the normal task execution.

       

      I have done the following:

       

      1. Created the macro and tested the macro by executing it in the QVW - all works fine and the csv file is created as required. I have also manually refreshed the QVW and the macro executes, creating the csv file. As mentioned this does not happen when the QVW is refreshed in the tasks section of the QEMC.

       

      2. I have created the .bat file to reload the qvw and it is as follows:

       

                "C\Program files\Qlikview\QV.exe" /r "E:\QlikView\Applications\Production\dashboards\Home Dashboard v2\FE Home Dashboard v2b  NTNAME.qvw"

                Exit

       

      On running this using command prompt as an administrator I would expect it to reload the above QVW - would I see this process showing in the tasks page of the QEMC? There are no error messages when I run it - both by executing it via command prompt and double clicking the .bat file.

       

      3. The task to reload the dashboard does seem to run on completion of the tasked/scheduled reload and the log file reads as follows - not the warning:

          

      (2013-05-17 10:10:35) Information: Executing ClusterID=1, QDSID=2e751242-807c-3a9e-bda0-c69c3ded9530 QDSMain.ExternalProgramTask

      (2013-05-17 10:10:35) Information: Starting task "macro_export" (Attempt 1 of 1)

      (2013-05-17 10:10:35) Information: Max run time: 1.00:00:00

      (2013-05-17 10:10:35) Information: Executing E:\bat\matterspace.bat

      (2013-05-17 10:10:35) Information: Executing commandline: "E:\bat\matterspace.bat" in folder "E:\bat".

      (2013-05-17 10:10:35) Warning: Process exited with non zero exit code: 3 at 17/05/2013 10:10:35

      (2013-05-17 10:10:35) Information: Process exited with exit code: 3 at 17/05/2013 10:10:35

      (2013-05-17 10:10:35) Warning: The task "macro_export" finished with warnings. WarningCount=1

       

      Can anyone please assist me on the above issue?

       

      For info: We have publisher and the version I am using is QV10

       

      Many thanks

      Scott