<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Run Macro from Console in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545215#M744848</link>
    <description>&lt;P&gt;I've already set all parameters but I see only black window.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Cattura.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6140i239FE7DC0064760A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura.PNG" alt="Cattura.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Feb 2019 16:45:10 GMT</pubDate>
    <dc:creator>it_bi_vg</dc:creator>
    <dc:date>2019-02-15T16:45:10Z</dc:date>
    <item>
      <title>Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545088#M744842</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've the application "A" that runs this macro, after Event PostReload or on demand from button.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;set objExcel=ActiveDocument.GetSheetObject("CH01")&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;objExcel.ExportEx filepath,4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I' ve publisher and I'd like to schedule&amp;nbsp; it from Management Console every day , but I can't reload this macro. It doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't like to use Windows Scheduler, I prefer to use only Qlikview tools.&lt;/P&gt;&lt;P&gt;I've red this: &lt;SPAN&gt;The OnPostReload event is not fired after a server reload.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if it wasn't possible, I would run on demand from other application "B".&lt;/P&gt;&lt;P&gt;In other words, Application "B" has a button (on demand from users), it opens application "A" and run macro or when I load script, it executes statement or file.bat that export table to qvd.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545088#M744842</guid>
      <dc:creator>it_bi_vg</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545109#M744843</link>
      <description>&lt;P&gt;Post reload trigger will not work on QMC. It only will work when run manually or from scheduler.&lt;/P&gt;&lt;P&gt;I can list out a few option you can explore.&lt;/P&gt;&lt;P&gt;1: store table using "store table into table.qvd" from script.&lt;/P&gt;&lt;P&gt;2: Run it from window scheduler as you have asked.&lt;/P&gt;&lt;P&gt;3: Run a task from qmc which will in turn run a batch file which will open a qvw on the server , do a reload , run the macro, store the table and close the qvw again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's up to you what you choose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pradosh&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 14:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545109#M744843</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-15T14:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545199#M744845</link>
      <description>&lt;P&gt;I can't use the first option, because I'd like to store a table with difficult and long KPIs .&lt;/P&gt;&lt;P&gt;I can use the third.&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;I've written Test_vbs :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;Set objShell = CreateObject("WScript.Shell")&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;set fso = CreateObject("Scripting.FileSystemObject")&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;dim CurrentDirectory&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;CurrentDirectory = fso.GetParentFolderName(Wscript.ScriptFullName)&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;set qv = CreateObject("QlikTech.QlikView")&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;dim qvDocName&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;qvDocName = fso.BuildPath(CurrentDirectory, "test.qvw")&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;objShell.AppActivate("test.qvw")&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;set doc = qv.OpenDoc(qvDocName)&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;set obj = doc.GetSheetObject("CH01")&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;obj.ExportEx "test.qvd",4&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;doc.CloseDoc&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;qv.Quit&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;-------------------------------------------&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;FONT size="2"&gt;I&lt;/FONT&gt;&lt;FONT size="2"&gt;'ve written test.bat&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;@echo off&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;wscript "C:\Desktop\test\Test_vbs.vbs"&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;-------------------------------------------&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="simsun,hei"&gt;In my qvw :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="simsun,hei"&gt;&lt;EM&gt;Execute cmd.exe /C test.bat ;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;-------------------------------------------&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;If I click on the&amp;nbsp;&lt;EM&gt;test.bat ,&amp;nbsp;&lt;/EM&gt;it works, If I run qvw, it doesn't create the qvd.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thanks.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 16:25:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545199#M744845</guid>
      <dc:creator>it_bi_vg</dc:creator>
      <dc:date>2019-02-15T16:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545204#M744846</link>
      <description>&lt;P&gt;I can't use the first option, because I'd like to store a table with difficult and long KPIs .&lt;/P&gt;&lt;P&gt;I can use the third.&lt;/P&gt;&lt;P&gt;&lt;FONT face="simsun,hei"&gt;In my qvw :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="simsun,hei"&gt;&lt;EM&gt;Execute cmd.exe /C test.bat ;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;EM&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;-------------------------------------------&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;If I click on the&amp;nbsp;&lt;EM&gt;test.bat ,&amp;nbsp;&lt;/EM&gt;it works, If I run qvw, it doesn't create the qvd.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thanks.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 16:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545204#M744846</guid>
      <dc:creator>it_bi_vg</dc:creator>
      <dc:date>2019-02-15T16:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545207#M744847</link>
      <description>&lt;P&gt;documnet setting-&amp;gt; security-&amp;gt; all macro overrides security are checked and run external programs are checked.&lt;/P&gt;&lt;P&gt;user preference-&amp;gt; macro related check&amp;nbsp;&lt;/P&gt;&lt;P&gt;last but not the least&lt;/P&gt;&lt;P&gt;go to script (ctrl+E) -&amp;gt; On the bottom where there is odbc connection option etc are there there is a setting tab -&amp;gt; setting-&amp;gt; can execute eternal commands -&amp;gt; check&lt;/P&gt;&lt;P&gt;run it again and it&amp;nbsp; shall work.&amp;nbsp; attach scrrenshot of these if it doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pradosh&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 16:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545207#M744847</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-15T16:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545215#M744848</link>
      <description>&lt;P&gt;I've already set all parameters but I see only black window.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Cattura.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6140i239FE7DC0064760A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Cattura.PNG" alt="Cattura.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 16:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545215#M744848</guid>
      <dc:creator>it_bi_vg</dc:creator>
      <dc:date>2019-02-15T16:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545220#M744849</link>
      <description>run some other batch file that will do a simple task like copying a file or something and see if that works or not.</description>
      <pubDate>Fri, 15 Feb 2019 16:51:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545220#M744849</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-15T16:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545225#M744850</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you need to provide the absolute path of the batch file in double quotes if it contains space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Execute cmd.exe /C&amp;nbsp; &amp;nbsp; &amp;nbsp;"c:/... absolute pathe to the file ... test.bat ";&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 16:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545225#M744850</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-15T16:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545235#M744851</link>
      <description>&lt;P&gt;If I use simple vbs , it works.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 17:01:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545235#M744851</guid>
      <dc:creator>it_bi_vg</dc:creator>
      <dc:date>2019-02-15T17:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545237#M744852</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/39674"&gt;@it_bi_vg&lt;/a&gt;&amp;nbsp; did you use the absolute path to the bat file in double quoted after cmd.exe /c ?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 17:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545237#M744852</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-15T17:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545241#M744853</link>
      <description>the problem isn't path, because I've used the same files and I replaced the simple statement to copy and it works.&lt;BR /&gt;Maybe it doesn't work because I can try to open an other qvw file, maybe it wants some parameters to open concurrent qvw.&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Feb 2019 17:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545241#M744853</guid>
      <dc:creator>it_bi_vg</dc:creator>
      <dc:date>2019-02-15T17:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Run Macro from Console</title>
      <link>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545269#M744854</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you are trying this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1: The bat file is just opening the&amp;nbsp; ABC qvw.&lt;/P&gt;&lt;P&gt;2: The ABC.qvw is in the server /desktop.&lt;/P&gt;&lt;P&gt;3: This qvw has an on open trigger , which runs a macro&lt;/P&gt;&lt;P&gt;4: Macro stores QVD/ does whatever it is supposed to do.&lt;BR /&gt;5: Bat file closes and ABC.qvw closes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried something similar above and it worked for me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pradosh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 18:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-Macro-from-Console/m-p/1545269#M744854</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-15T18:57:10Z</dc:date>
    </item>
  </channel>
</rss>

