<?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 Macro to create an excel file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-create-an-excel-file/m-p/283772#M105487</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2011 13:46:26 GMT</pubDate>
    <dc:creator>camilo</dc:creator>
    <dc:date>2011-08-19T13:46:26Z</dc:date>
    <item>
      <title>Macro to create an excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-create-an-excel-file/m-p/283771#M105486</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;I´m currently using a macro I found in this forum to create excel sheets, it works perfectly but it just selects the variables from one list box. I would like to select the variables from 2 or maybe 3 listbox (Cat, Zona, Date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the working macro and then is my failed intent to use two list box in one macro, any advice is more than welcome &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Working Macro --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Export2&lt;/P&gt;&lt;P&gt;rem get Possible Zonas&lt;/P&gt;&lt;P&gt;set ZonaListbox = ActiveDocument.GetSheetObject("LB08")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Zona=ZonaListbox.GetPossibleValues&lt;/P&gt;&lt;P&gt;rem go through Zonas&lt;/P&gt;&lt;P&gt;for zonacounter = lbound(Zona) to ubound(Zona)&amp;nbsp; &lt;/P&gt;&lt;P&gt; rem clear previous selections&lt;/P&gt;&lt;P&gt; rem ActiveDocument.ClearAll false&lt;/P&gt;&lt;P&gt; rem Select Zona&lt;/P&gt;&lt;P&gt; ActiveDocument.Fields("Zona_Nueva").Select Zona(Zonacounter)&lt;/P&gt;&lt;P&gt; rem Compose filename&lt;/P&gt;&lt;P&gt;rem file="Employee" &amp;amp; Emps(Empcounter) &amp;amp; ".xlsx"&lt;/P&gt;&lt;P&gt; file="C:\"&amp;amp;"Zona - " &amp;amp; Zona(Zonacounter) &amp;amp; ".xls"&lt;/P&gt;&lt;P&gt; set Chart2Export = ActiveDocument.GetSheetObject("CH18")&lt;/P&gt;&lt;P&gt; Chart2Export.ExportBiff file&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt; ActiveDocument.ClearAll false&lt;/P&gt;&lt;P&gt;MsgBox "Exports Done!"&lt;/P&gt;&lt;P&gt;End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Failed Macro --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Export3&lt;/P&gt;&lt;P&gt;set ZonaListbox = ActiveDocument.GetSheetObject("LB08")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Zona=ZonaListbox.GetPossibleValues&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CatListbox = ActiveDocument.GetSheetObject("LB07")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cats=CatListbox.GetPossibleValues&lt;/P&gt;&lt;P&gt;for zonacounter = lbound(Zona) to ubound(Zona)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.Fields("Zona_Nueva").Select Zona(Zonacounter)&lt;/P&gt;&lt;P&gt;for catcounter = lbound(Cats) to ubound(Cats)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.Fields("Cat").Select Cats(Catcounter)&lt;/P&gt;&lt;P&gt; file="C:\"&amp;amp;"Zona - " &amp;amp; Cats(Catcounter)&amp;amp; Zona(Zonacounter) &amp;amp; ".xls"&lt;/P&gt;&lt;P&gt; set Chart2Export = ActiveDocument.GetSheetObject("CH18")&lt;/P&gt;&lt;P&gt; Chart2Export.ExportBiff file&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt; ActiveDocument.ClearAll false&lt;/P&gt;&lt;P&gt;MsgBox "Exports Done!"&lt;/P&gt;&lt;P&gt;End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 22:55:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-create-an-excel-file/m-p/283771#M105486</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-18T22:55:22Z</dc:date>
    </item>
    <item>
      <title>Macro to create an excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-create-an-excel-file/m-p/283772#M105487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 13:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-create-an-excel-file/m-p/283772#M105487</guid>
      <dc:creator>camilo</dc:creator>
      <dc:date>2011-08-19T13:46:26Z</dc:date>
    </item>
  </channel>
</rss>

