<?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 How to combine multiple straight tables? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218111#M71276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a macro you can use to export multiple tables to the same Excel Worksheet. You should create a variable vNoTables that is 3 and change the object ID's of your tables to T1, T2 and T3.&lt;/P&gt;&lt;P&gt;sub CopyToXL&lt;/P&gt;&lt;P&gt;dim iCount&lt;BR /&gt; dim No_Tables&lt;BR /&gt; dim ObjName&lt;BR /&gt; dim ObjCaption&lt;BR /&gt;&lt;BR /&gt; iCount=1&lt;BR /&gt;&lt;BR /&gt; set XLApp = CreateObject("Excel.Application") ' Define Object&lt;BR /&gt; XLApp.Visible = True 'Visible set as true&lt;BR /&gt; set XLDoc = XLApp.Workbooks.Add 'Open new workbook&lt;BR /&gt;&lt;BR /&gt; 'Take the List of Object's in Excel&lt;BR /&gt;&lt;BR /&gt; set XLSheet = XLDoc.Worksheets(1)&lt;BR /&gt;&lt;BR /&gt; No_Tables = CInt(ActiveDocument.Variables("vNoTables").GetContent.String)&lt;BR /&gt;&lt;BR /&gt; for i = 1 to No_Tables&lt;BR /&gt;&lt;BR /&gt; set SheetObj = ActiveDocument.GetSheetObject("T" &amp;amp; i)&lt;BR /&gt; ObjCaption = SheetObj.GetCaption.Name.v&lt;BR /&gt; SheetObj.CopyTableToClipboard true&lt;BR /&gt; if i=1 then&lt;BR /&gt; XLSheet.Range("A"&amp;amp;iCount) = ObjCaption&lt;BR /&gt; XLSheet.Range("A"&amp;amp;iCount).Font.Bold = True&lt;BR /&gt; XLSheet.Paste XLSheet.Range("A"&amp;amp;iCount+1)&lt;BR /&gt; else&lt;BR /&gt; XLSheet.Paste XLSheet.Range("A"&amp;amp;iCount)&lt;BR /&gt; end if&lt;BR /&gt; iCount= XLSheet.UsedRange.Rows.Count + 1&lt;BR /&gt;&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Sep 2010 22:06:04 GMT</pubDate>
    <dc:creator>pover</dc:creator>
    <dc:date>2010-09-24T22:06:04Z</dc:date>
    <item>
      <title>How to combine multiple straight tables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218110#M71275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need help combining multiple straight tables into one table to export into Excel? The columns are identical in all tables.&lt;/P&gt;&lt;P&gt;OR - use the send to excel function to send the data into the same excel sheet?&lt;/P&gt;&lt;P&gt;The data is in separate straight tables due to calculations being performed on the field values - separate calculations each table.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 21:39:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218110#M71275</guid>
      <dc:creator />
      <dc:date>2010-09-24T21:39:52Z</dc:date>
    </item>
    <item>
      <title>How to combine multiple straight tables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218111#M71276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a macro you can use to export multiple tables to the same Excel Worksheet. You should create a variable vNoTables that is 3 and change the object ID's of your tables to T1, T2 and T3.&lt;/P&gt;&lt;P&gt;sub CopyToXL&lt;/P&gt;&lt;P&gt;dim iCount&lt;BR /&gt; dim No_Tables&lt;BR /&gt; dim ObjName&lt;BR /&gt; dim ObjCaption&lt;BR /&gt;&lt;BR /&gt; iCount=1&lt;BR /&gt;&lt;BR /&gt; set XLApp = CreateObject("Excel.Application") ' Define Object&lt;BR /&gt; XLApp.Visible = True 'Visible set as true&lt;BR /&gt; set XLDoc = XLApp.Workbooks.Add 'Open new workbook&lt;BR /&gt;&lt;BR /&gt; 'Take the List of Object's in Excel&lt;BR /&gt;&lt;BR /&gt; set XLSheet = XLDoc.Worksheets(1)&lt;BR /&gt;&lt;BR /&gt; No_Tables = CInt(ActiveDocument.Variables("vNoTables").GetContent.String)&lt;BR /&gt;&lt;BR /&gt; for i = 1 to No_Tables&lt;BR /&gt;&lt;BR /&gt; set SheetObj = ActiveDocument.GetSheetObject("T" &amp;amp; i)&lt;BR /&gt; ObjCaption = SheetObj.GetCaption.Name.v&lt;BR /&gt; SheetObj.CopyTableToClipboard true&lt;BR /&gt; if i=1 then&lt;BR /&gt; XLSheet.Range("A"&amp;amp;iCount) = ObjCaption&lt;BR /&gt; XLSheet.Range("A"&amp;amp;iCount).Font.Bold = True&lt;BR /&gt; XLSheet.Paste XLSheet.Range("A"&amp;amp;iCount+1)&lt;BR /&gt; else&lt;BR /&gt; XLSheet.Paste XLSheet.Range("A"&amp;amp;iCount)&lt;BR /&gt; end if&lt;BR /&gt; iCount= XLSheet.UsedRange.Rows.Count + 1&lt;BR /&gt;&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 22:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218111#M71276</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-09-24T22:06:04Z</dc:date>
    </item>
    <item>
      <title>How to combine multiple straight tables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218112#M71277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wow - writing a macro in Qlikview is over my head. I'll do some research on how that's done, and give this a try.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 22:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218112#M71277</guid>
      <dc:creator />
      <dc:date>2010-09-24T22:13:11Z</dc:date>
    </item>
    <item>
      <title>How to combine multiple straight tables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218113#M71278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;have a look at &lt;A href="http://www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/"&gt;http://www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This article can maybe help ...&lt;/P&gt;&lt;P&gt;Regards, Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2011 15:46:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218113#M71278</guid>
      <dc:creator>Stefan_Walther</dc:creator>
      <dc:date>2011-04-29T15:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine multiple straight tables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218114#M71279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea how the same code be applied to export multiple tables held in a container?&amp;nbsp; I'm unsure how to activate a sheet object in a container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the same general code althought modified with a Do loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Here's a macro you can use to export multiple tables to the same Excel Worksheet. You should change the object ID's of your tables to T1, T2 and T3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub CopyToXL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim iCount&lt;/P&gt;&lt;P&gt;dim No_Tables&lt;/P&gt;&lt;P&gt;dim ObjName&lt;/P&gt;&lt;P&gt;dim ObjCaption&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iCount=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set XLApp = CreateObject("Excel.Application") ' Define Object&lt;/P&gt;&lt;P&gt;XLApp.Visible = True 'Visible set as true&lt;/P&gt;&lt;P&gt;set XLDoc = XLApp.Workbooks.Add 'Open new workbook&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set XLSheet = XLDoc.Worksheets(1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No_Tables = 3 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO WHILE No_Tables &amp;lt; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set SheetObj = ActiveDocument.GetSheetObject("T"&amp;amp;No_Tables)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SheetObj.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLSheet.Paste XLSheet.Range("A"&amp;amp;iCount)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; iCount= XLSheet.UsedRange.Rows.Count + 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; No_Tables = No_Tables + 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 13:39:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-multiple-straight-tables/m-p/218114#M71279</guid>
      <dc:creator />
      <dc:date>2011-10-13T13:39:11Z</dc:date>
    </item>
  </channel>
</rss>

