<?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: Export multiple object to multiple sheets - Excel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644839#M236330</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The sheet is assigned by number:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Set curSheet = curWorkBook.WorkSheets(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;You can set the sheet #2 as curSheet and repeat (copy) the loop with appropriate objects.&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2014 15:36:33 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2014-06-09T15:36:33Z</dc:date>
    <item>
      <title>Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644836#M236327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this macro below to export multiple object to excel. What I need is to add some code to export more object to other sheet in excel. I would appreciate your help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sub test&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Set the path where the excel will be saved&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;filePath = "C:\Test.xlsx"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Create the Excel spreadsheet&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set excelFile = CreateObject("Excel.Application")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;excelFile.Visible = true&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Create the WorkBook&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set curWorkBook = excelFile.WorkBooks.Add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Create the Sheet&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'first chart object&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set curSheet = curWorkBook.WorkSheets(1) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'loop&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;chartArray = Array("CH421","CH11", "CH12")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;usedRows=0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For Each chart In chartArray&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; Set i = ActiveDocument.GetSheetObject(chart)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; chartCaption = i.GetCaption.Name.v&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Cells(usedRows+1, 1)=chartCaption&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i.CopyTableToClipboard true&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Cells(usedRows+3, 1).Select&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Paste&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usedRows=curSheet.UsedRange.Rows.Count+3 '---&amp;gt;function to get the first unused row&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'loop end&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;excelFile.Visible = true&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Save the file and quit excel&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curWorkBook.SaveAs filePath&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curWorkBook.Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelFile.Quit&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Cleanup&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set curWorkBook = nothing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set excelFile = nothing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end sub&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 13:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644836#M236327</guid>
      <dc:creator />
      <dc:date>2014-06-09T13:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644837#M236328</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;There is a list of objects to export in the line&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;chartArray = Array("CH421","CH11", "CH12")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You can simply add the id of objects that you want to export.&lt;/P&gt;&lt;P&gt;To get the object id, open object properties general tab, the top right corner.&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 13:12:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644837#M236328</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-06-09T13:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644838#M236329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know that, but I want to add object ("CH13","CH14","CH15") on sheet 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 13:18:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644838#M236329</guid>
      <dc:creator />
      <dc:date>2014-06-09T13:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644839#M236330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The sheet is assigned by number:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Set curSheet = curWorkBook.WorkSheets(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;You can set the sheet #2 as curSheet and repeat (copy) the loop with appropriate objects.&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 15:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644839#M236330</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-06-09T15:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644840#M236331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this but he didnt copy object to another sheet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 15:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644840#M236331</guid>
      <dc:creator />
      <dc:date>2014-06-09T15:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644841#M236332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try and send me macro if you succeed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 15:50:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644841#M236332</guid>
      <dc:creator />
      <dc:date>2014-06-09T15:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644842#M236333</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;You have to make the sheet 'active' to perform copypaste.&lt;/P&gt;&lt;P&gt;Add &lt;STRONG&gt;curSheet.Activate &lt;/STRONG&gt;before the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's really a VBA question.&lt;/P&gt;&lt;P&gt;You can find more information in MSDN, StackOverflow and other related resources.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 06:44:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644842#M236333</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-06-10T06:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple object to multiple sheets - Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644843#M236334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tnx whiteline &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Now it works, and you are right this is VBA question, but I assumed that someone did something like this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 06:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-multiple-object-to-multiple-sheets-Excel/m-p/644843#M236334</guid>
      <dc:creator />
      <dc:date>2014-06-10T06:56:13Z</dc:date>
    </item>
  </channel>
</rss>

