<?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 an array of Qlikview objects not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906810#M1001709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked the object IDs, I changed the graph and Qlikview reset the Object ID without me realizing back to "CH09". Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2015 07:25:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-05T07:25:49Z</dc:date>
    <item>
      <title>Looping through an array of Qlikview objects not working</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906807#M1001706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to export qlikview data to an Excel spreadsheet&amp;nbsp; using an array and a For Loop in a macro.&lt;/P&gt;&lt;P&gt;I indicate the items in the array "objArray", I then run through the array using a For loop. Inside the For loop I set a variable to the current item in the array being used to "currObj", however it does not seem like the item in the array is being set as the script stops as soon as I first use the "currObj" variable. I can't seem to find why it is not assigning the variable "currObj" so that I can use it. Please help. Below is an extract from the export to excel macro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set excelFile = CreateObject("Excel.Application") &lt;BR /&gt;Set selectWorkbook = excelfile.workbooks.open(objFolder.self.path)&lt;BR /&gt;excelFile.Visible = true&lt;BR /&gt; &lt;BR /&gt; Set s = ActiveDocument.Sheets("3.1 Stock Exceptions")&lt;BR /&gt; ActiveDocument.Sheets("3.1 Stock Exceptions").Activate&lt;BR /&gt; ActiveDocument.ClearCache&lt;BR /&gt; &lt;BR /&gt; set excelSheet = selectWorkbook.worksheets("3.1_Exceptions")&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;emptyRow = 53&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; objArray = Array("ExceptionSummaryChart", "Exception_1", "Exception_2", "Exception_3", "Exception_4", "Exception_5")&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; For i = 0 to 5&lt;BR /&gt; &lt;BR /&gt; set ActiveSht = Excelfile.ActiveSheet&lt;BR /&gt; set currObj = ActiveDocument.GetSheetObject(objArray(i))&lt;BR /&gt; &lt;BR /&gt; if currObj.GetRowCount = 0 then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveSht.Cells(EmptyRow,1) = currObj.GetCaption.Name.v&lt;BR /&gt;ActiveSht.Cells(EmptyRow +1,1) = "No Exceptions Identified"&lt;BR /&gt; &lt;BR /&gt; Else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ActiveSht.Cells(EmptyRow,1)= currObj.GetCaption.Name.v&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; currObj.CopyTableToClipboard true &lt;BR /&gt; ActiveSht.Cells(EmptyRow+2,1).Select&lt;BR /&gt; ActiveSht.Paste&lt;BR /&gt; 'excelsht.Paste excelsht.Range("A7")&lt;BR /&gt; ActiveSht.Cells.EntireColumn.AutoFit&lt;BR /&gt; emptyRow = excelSheet.UsedRange.rows.count + 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.GetSheetObject(currObj).Minimize&lt;BR /&gt;ActiveDocument.ClearCache&lt;BR /&gt; &lt;BR /&gt;set currObj = Nothing&lt;BR /&gt;set excelSheet = nothing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end if&lt;BR /&gt; &lt;BR /&gt;Next &lt;BR /&gt; &lt;BR /&gt;excelSheet.SaveAs.Path objFolder.self.path&lt;BR /&gt; &lt;BR /&gt;Set Excelfile = nothing&lt;BR /&gt;Set selectWorkbook = nothing&lt;BR /&gt;Set excelSheet = nothing &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906807#M1001706</guid>
      <dc:creator />
      <dc:date>2020-11-20T18:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through an array of Qlikview objects not working</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906808#M1001707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps looking at working code can help you find the problem in your code: &lt;A href="http://www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/" title="http://www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/"&gt;QlikTip #32: Exporting multiple QV objects to a single Excel document&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 15:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906808#M1001707</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-06-04T15:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through an array of Qlikview objects not working</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906809#M1001708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that the object-ID's are like "Exception_1" and not like "CH01"? Also sometimes it is needed to dimension an array like: dim arr(6) or by dynamically filled/changed arrays with redim arr(AnyNumber).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you simplified the code for testing reasons and comment this and other statements and used msgbox with your loop-counter i and simple "a", "b", ... by each branch or similar to see if they work respectively by which counter it hangs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 20:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906809#M1001708</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-06-04T20:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through an array of Qlikview objects not working</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906810#M1001709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked the object IDs, I changed the graph and Qlikview reset the Object ID without me realizing back to "CH09". Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 07:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-an-array-of-Qlikview-objects-not-working/m-p/906810#M1001709</guid>
      <dc:creator />
      <dc:date>2015-06-05T07:25:49Z</dc:date>
    </item>
  </channel>
</rss>

