<?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: Macro to export Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746592#M663267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script is contained in property&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDocument.GetProperties.Script&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a quick macro to write the script from the current QVW to a text file could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'courier new', courier;"&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Set objTextFile = &lt;SPAN style="font-size: 13.3333330154419px;"&gt; objFSO.OpenTextFile "C;\myfile.qvs", 2, True)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;objTextFile.Write(ActiveDocument.GetProperties.Script)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;objTextFile.Close()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you download &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Qlikview Cookbook: QVS Editor &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/recipes/download-info/qvs-editor/" rel="nofollow"&gt;http://qlikviewcookbook.com/recipes/download-info/qvs-editor/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It contains macro code that reads &amp;amp; writes script.&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"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com" rel="nofollow"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2015 02:33:16 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2015-04-20T02:33:16Z</dc:date>
    <item>
      <title>Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746590#M663265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to make a macro that copy all of the content in 'Edit Script' (obviously for every sheet in script) and export to Word Document or another format? (Excel,txt,csv?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried a different things, search in community and read API Guide but I didn't find anything. Is there any function that allows me to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 16:29:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746590#M663265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-18T16:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746591#M663266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, here you have some examples to excel and ppt (for word is similar)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Apr 2015 19:03:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746591#M663266</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2015-04-19T19:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746592#M663267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script is contained in property&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ActiveDocument.GetProperties.Script&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a quick macro to write the script from the current QVW to a text file could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'courier new', courier;"&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Set objTextFile = &lt;SPAN style="font-size: 13.3333330154419px;"&gt; objFSO.OpenTextFile "C;\myfile.qvs", 2, True)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;objTextFile.Write(ActiveDocument.GetProperties.Script)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;objTextFile.Close()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you download &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Qlikview Cookbook: QVS Editor &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/recipes/download-info/qvs-editor/" rel="nofollow"&gt;http://qlikviewcookbook.com/recipes/download-info/qvs-editor/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It contains macro code that reads &amp;amp; writes script.&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"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com" rel="nofollow"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 02:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746592#M663267</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-04-20T02:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746593#M663268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it possible to post the macro in the blog. I have the personal edition&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 04:04:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746593#M663268</guid>
      <dc:creator>ziadm</dc:creator>
      <dc:date>2015-04-20T04:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746594#M663269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the above snippet to create layout &amp;amp; script from my qvw files but in most of my files. I keep getting error in &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;objTextFile.Write(ActiveDocument.GetProperties.Script) [Invalid procedure call or argument].It creates an empty file but is not able to write in the file. Its working if I use Admin access , I have read/write permission to the folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Sub SaveQvsLayout()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objFSO = CreateObject("Scripting.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;FileSystemObject")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objTextFile = objFSO.OpenTextFile ("E:\bb\analytics\qlikview\" &amp;amp; Right(replace(ActiveDocument.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Name, ".qvw", ".qvs"),Len(ActiveDocument.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Name)-InstrRev(ActiveDocument.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Name,"\",-1)), 2, True)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objTextFile.Write(&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;ActiveDocument.GetProperties.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Script)&amp;nbsp; 'Error-&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;Invalid procedure call or argument&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objTextFile.Close()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;ExportLayoutFile("E:\bb\&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;analytics\qlikview\" &amp;amp; Right(replace(ActiveDocument.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Name, ".qvw", ".xml"),Len(ActiveDocument.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Name)-InstrRev(ActiveDocument.&lt;/SPAN&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;Name,"\",-1)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 13:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746594#M663269</guid>
      <dc:creator />
      <dc:date>2015-11-05T13:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746595#M663270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it's working if you open the qvw with Admin access? Why not open them all with Admin then. Or is that not possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 19:37:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746595#M663270</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-11-05T19:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746596#M663271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing this to add all *.qvs/*.xml to version control. I have admin permissions but rest of the team doesn't so I wanted it to work for everyone. The only permission rest of the team doesn't have for &lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8px;"&gt;E:\bb\analytics\qlikview\ is special permissions . I think that permission is responsible here I will try giving them that.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 01:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746596#M663271</guid>
      <dc:creator />
      <dc:date>2015-11-06T01:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746597#M663272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer and that is really helpful Rob.&lt;/P&gt;&lt;P&gt;But When I am trying to executed the macro code that you have provided me&amp;nbsp; I am getting follow error in my edit module window as -----&amp;nbsp; permission denied. Could you help me with some idea.&lt;/P&gt;&lt;P&gt;thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 20:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746597#M663272</guid>
      <dc:creator />
      <dc:date>2016-08-23T20:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746598#M663273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to enable system-access within the modul security (left pane in the mid).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 07:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746598#M663273</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-08-24T07:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746599#M663274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcus, that worked for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 13:19:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/746599#M663274</guid>
      <dc:creator />
      <dc:date>2016-08-24T13:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export Script</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/1663245#M663275</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Is it possible to export document layout of all QVW files (lets say saved in some workspace location) at a time ,through JavaScript API or any other tool supported by QlikView&amp;nbsp; .If i want to do it manually ,i have to open every QVW document and had to&amp;nbsp; click export document layout.Please help in this regard.&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Varun&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 10:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-Script/m-p/1663245#M663275</guid>
      <dc:creator>varunqvmm</dc:creator>
      <dc:date>2020-01-08T10:57:27Z</dc:date>
    </item>
  </channel>
</rss>

