<?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: Looping through filter values and saving the output to a csv file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looping-through-filter-values-and-saving-the-output-to-a-csv/m-p/1206266#M387662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim, this worked perfectly! The only change I made was saving the file as ".csv" instead of ".xls" I really appreciated all of your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2016 18:15:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-07T18:15:59Z</dc:date>
    <item>
      <title>Looping through filter values and saving the output to a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-filter-values-and-saving-the-output-to-a-csv/m-p/1206264#M387660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;I have a list box with 14 entries.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;For each selection, I want to: &lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-style: normal; font-weight: normal;"&gt;Select all filters values except one&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Run a macro that will &lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI style="color: #000000; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal;"&gt;&lt;P style="color: #000000; line-height: normal; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-add-space: auto; mso-list: l1 level2 lfo1;"&gt;copy a specific table from QlikView (ex. CH1000) &lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #000000; line-height: normal; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-add-space: auto; mso-list: l1 level2 lfo1;"&gt;create a csv file and &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #000000; line-height: normal; font-family: 'Calibri',sans-serif; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0pt; mso-add-space: auto; mso-list: l1 level2 lfo1;"&gt;save the csv file in a folder&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;For example, if I have a list box (Product) with four entries: A, B, C, D I want a macro that &lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;P style="font-style: normal; font-weight: normal;"&gt;selects Product A, B and C and saves table CH1000 to a csv file&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;selects Product B, C and D and saves table CH1000 to a csv file&lt;/LI&gt;&lt;LI&gt;selects Product C, D and A and saves table CH1000 to a csv file&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Calibri;"&gt;I do not need the code to be dynamic, so I could specify each combination of filters to apply (i.e., ABC, BCD, CDA). But as my VB skills are limited, I am not sure how to implement this.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I am open to any alternatives beyond VB and appreciate any help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 02:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-filter-values-and-saving-the-output-to-a-csv/m-p/1206264#M387660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T02:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through filter values and saving the output to a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-filter-values-and-saving-the-output-to-a-csv/m-p/1206265#M387661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a vbscript that will do exactly what you want except that outout Format is xls.&lt;/P&gt;&lt;P&gt;You can Change it to csv if you want.&lt;/P&gt;&lt;P&gt;Change LB01 to your Listbox Name.&lt;/P&gt;&lt;P&gt;Change CH02 to your Chart Name.&lt;/P&gt;&lt;P&gt;Change "Name" to the fieldname of your listbox&lt;/P&gt;&lt;P&gt;Change path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub export_to_csv()&lt;BR /&gt; &lt;BR /&gt; ActiveDocument.ClearAll&lt;BR /&gt; &lt;BR /&gt; set lb = ActiveDocument.GetSheetObject("LB01") 'Listbox Name&lt;BR /&gt; set ch = ActiveDocument.GetSheetObject("CH02") 'Chart Name&lt;BR /&gt; path = "C:\temp\" 'output Path&lt;BR /&gt; &lt;BR /&gt; ActiveDocument.Fields("Name").SelectAll&lt;BR /&gt; set values = ActiveDocument.Fields("Name").GetSelectedValues&lt;BR /&gt; &lt;BR /&gt; For i = 0 to ActiveDocument.Fields("Name").GetSelectedValues.Count - 1&lt;BR /&gt; &lt;BR /&gt; ActiveDocument.Fields("Name").Select values.Item(i).Text&lt;BR /&gt; ActiveDocument.Fields("Name").SelectExcluded&lt;BR /&gt; name_Excel = "All_Except_" &amp;amp; values.Item(i).Text &amp;amp; ".xls"&lt;BR /&gt; ch.ExportBiff path &amp;amp; name_Excel 'Export to xls&lt;BR /&gt; &lt;BR /&gt; next &lt;BR /&gt; &lt;BR /&gt; end sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 06:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-filter-values-and-saving-the-output-to-a-csv/m-p/1206265#M387661</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2016-10-07T06:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through filter values and saving the output to a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-filter-values-and-saving-the-output-to-a-csv/m-p/1206266#M387662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim, this worked perfectly! The only change I made was saving the file as ".csv" instead of ".xls" I really appreciated all of your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 18:15:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-filter-values-and-saving-the-output-to-a-csv/m-p/1206266#M387662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-07T18:15:59Z</dc:date>
    </item>
  </channel>
</rss>

