<?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 Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209390#M388204</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dermot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure but try to run the script by changing the below line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; text-decoration: line-through;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: line-through;"&gt;For i = 1 to Val.count - 1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For i = 0 to Val.count&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Oct 2016 07:43:57 GMT</pubDate>
    <dc:creator>tamilarasu</dc:creator>
    <dc:date>2016-10-21T07:43:57Z</dc:date>
    <item>
      <title>Macro Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209387#M388201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Macro below loops though customers and copies table data into Excel report.&amp;nbsp; Everything works fine but I always end up with a Customer report less than I should?&amp;nbsp; Cant see why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub ExportLines()&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; Dim strvPCT&amp;nbsp; &lt;BR /&gt; Dim strvPeriod&lt;BR /&gt; DIM SaveName&lt;BR /&gt; &lt;BR /&gt; vX=Year(now())&amp;amp;month(now())&amp;amp;day(now())&lt;BR /&gt; &lt;BR /&gt; Set Val=ActiveDocument.Fields("CUSTOMER").GetPossibleValues(20000)&lt;BR /&gt; For i = 1 to Val.count - 1&lt;BR /&gt; &lt;BR /&gt; 'SET RowCount = ActiveDocument.Variables("vRowCount")&lt;BR /&gt; 'RowCount.GetContent.String&lt;BR /&gt; &lt;BR /&gt; set XLApp = CreateObject("Excel.Application")&lt;BR /&gt; &lt;BR /&gt; set XLDOC = XLApp.Workbooks.Open ("C:\Qlikivew Extracts\Open Orders Blank.xlsm")&lt;BR /&gt; 'set XLDOC = XLApp.Workbooks.Open ("C:\Qlikivew Extracts\Open Orders Blank.xlsm")&lt;BR /&gt; &lt;BR /&gt; XLApp.Visible = True&lt;BR /&gt; &lt;BR /&gt; strVal = Val.item(i).Text &lt;BR /&gt; &lt;BR /&gt; 'Use The Customer list box in the current open document and loop through possible choices&lt;BR /&gt; activedocument.fields("CUSTOMER").select Val.item(i).Text&lt;BR /&gt; &lt;BR /&gt; vMySelectFieldValue = Val.item(i).Text&lt;BR /&gt; &lt;BR /&gt; SaveName = strClean(strVal)&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; 'With the selected customer ouput the data from table "CH168" to the open Excel Document.&lt;BR /&gt; ActiveDocument.GetSheetObject("CH168").CopyTableToClipboard true&lt;BR /&gt; set XLSheet = XLDOC.Worksheets("PasteSheet")&lt;BR /&gt; XLSheet.Paste XLSheet.Range("A16")&lt;BR /&gt; &lt;BR /&gt; 'Save the document, close it and then start again &lt;/P&gt;&lt;P&gt; XLDoc.SaveAs "C:\Qlikivew Extracts\" &amp;amp; SaveName &amp;amp; " - Backlog " &amp;amp; vX &amp;amp; " .xlsm" &lt;BR /&gt; &lt;BR /&gt; XLDoc.Close&lt;BR /&gt; XLApp.Quit &lt;BR /&gt; 'End If &lt;BR /&gt; &lt;BR /&gt; Next&lt;BR /&gt; ActiveDocument.GetApplication.WaitForIdle&amp;nbsp; &lt;BR /&gt; ActiveDocument.ClearCache&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; End Sub &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 07:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209387#M388201</guid>
      <dc:creator>dmac1971</dc:creator>
      <dc:date>2016-10-21T07:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209388#M388202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you getting 20000 records and you expect more? This line is limiting the export for 20000 rows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;Set Val=ActiveDocument.Fields("CUSTOMER").GetPossibleValues(&lt;STRONG&gt;20000&lt;/STRONG&gt;);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Adjust as required.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Or use the built in export functions, like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set obj = ActiveDocument.GetSheetObject("CH01")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;obj.ExportEx "C:\test.qvd", 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 07:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209388#M388202</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-10-21T07:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209389#M388203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No far less Jonathan, only around 50.&amp;nbsp; That was in original code I borrowed, &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;, from forums here last year.&amp;nbsp; Thanks for reply though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 07:35:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209389#M388203</guid>
      <dc:creator>dmac1971</dc:creator>
      <dc:date>2016-10-21T07:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209390#M388204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dermot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure but try to run the script by changing the below line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; text-decoration: line-through;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: line-through;"&gt;For i = 1 to Val.count - 1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For i = 0 to Val.count&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 07:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209390#M388204</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-10-21T07:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209391#M388205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this line&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; text-decoration: line-through;"&gt;For i = 1 to Val.count - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;should be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;For i = &lt;STRONG&gt;0&lt;/STRONG&gt; to Val.count - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 09:43:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Issue/m-p/1209391#M388205</guid>
      <dc:creator>tunoi</dc:creator>
      <dc:date>2016-10-21T09:43:03Z</dc:date>
    </item>
  </channel>
</rss>

