<?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: Read variable into macro code with out active document in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415050#M427561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It did not work. Understand with in community that, if we call macro with in script with ActiveDocument it wont work. &lt;/P&gt;&lt;P&gt;Attached document for your reference. The objective of the document is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Read .XLS file &lt;/P&gt;&lt;P&gt;2. Assign the filename with path to a variable&lt;/P&gt;&lt;P&gt;3. call macro function to convert the XLS to cls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit module --&amp;gt; Test is working fine. But when I call the same macro from script is not working. I guess its because of ActiveDocument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Dec 2017 15:38:32 GMT</pubDate>
    <dc:creator>pavandbs</dc:creator>
    <dc:date>2017-12-02T15:38:32Z</dc:date>
    <item>
      <title>Read variable into macro code with out active document</title>
      <link>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415048#M427559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set of .xls files want to convert to csv because of some issue in loading. I have a script to read file by file then call macro code with in that loop. Problem is I am passing file into variable and passing that variable value into macro. Understand active document wont work with in macro, is there any alternate for this ? Below is my macro code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;strValueToDisplay = ActiveDocument.Variables("&lt;SPAN style="color: #ff0000;"&gt;vFile&lt;/SPAN&gt;").GetContent().String&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vFile have file path and name. On edit module --&amp;gt; its working fine. However calling macro from script is not working. Please advice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pavan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2017 04:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415048#M427559</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2017-12-02T04:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Read variable into macro code with out active document</title>
      <link>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415049#M427560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this? I've remove the () from extension of GetContent..&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;strValueToDisplay =&amp;nbsp; ActiveDocument.Variables("&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;vFile&lt;/SPAN&gt;").GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2017 11:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415049#M427560</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-02T11:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Read variable into macro code with out active document</title>
      <link>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415050#M427561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It did not work. Understand with in community that, if we call macro with in script with ActiveDocument it wont work. &lt;/P&gt;&lt;P&gt;Attached document for your reference. The objective of the document is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Read .XLS file &lt;/P&gt;&lt;P&gt;2. Assign the filename with path to a variable&lt;/P&gt;&lt;P&gt;3. call macro function to convert the XLS to cls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit module --&amp;gt; Test is working fine. But when I call the same macro from script is not working. I guess its because of ActiveDocument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2017 15:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415050#M427561</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2017-12-02T15:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Read variable into macro code with out active document</title>
      <link>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415051#M427562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pass your variable value as a string to the Function. ie in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vExecFunction = RepairXLS('$(vFile)');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;function RepairXLS(myfile)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2017 21:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415051#M427562</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-12-02T21:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read variable into macro code with out active document</title>
      <link>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415052#M427563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob it worked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavan Ch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Dec 2017 01:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Read-variable-into-macro-code-with-out-active-document/m-p/1415052#M427563</guid>
      <dc:creator>pavandbs</dc:creator>
      <dc:date>2017-12-03T01:29:22Z</dc:date>
    </item>
  </channel>
</rss>

