1 Reply Latest reply: Feb 22, 2017 6:52 AM by gareth wilson RSS

    Automate daily macro

    P M

      Hi

       

      I would like to keep open a Qlik desktop so the below can be automated to run at 08:00 every day.

      Is this possible please ?

       

       

      Sub ExportToFile

       

      vStamp = ActiveDocument.Evaluate("TimeStamp(Now(),'YYYYMMDDhhmm')")

      vToday = ActiveDocument.Evaluate("TimeStamp(Now(),'YYYYMMDD')")

       

      set sObject = ActiveDocument.GetSheetObject("SoOpen")

      sObject.Export "\\Upload\OpenSalesOrders_" & vStamp & ".csv", ", "

       

      End Sub

        • Re: Automate daily macro
          gareth wilson

          You can use a windows scheduled task to run the document from the command line where ** is you document path e.g.;

           

          C:\Program Files\QlikView\qv.exe *C:\Users\gwilson\Documents\Qlik\DateTime.qvw*

           

          Then in the Document Properties of your document you can use an OnOpen Trigger to run the macro