<?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 Export to Excel - Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644045#M235990</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 need to to export multiple object from QlikView into multiple sheets in Excel. I know that I need macro for this, and I found some discussion on this subject, but I didnt find how to calculate number of row in each object and to add other object for example two row below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm grateful on any help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jun 2014 09:13:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-09T09:13:14Z</dc:date>
    <item>
      <title>Export to Excel - Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644045#M235990</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 need to to export multiple object from QlikView into multiple sheets in Excel. I know that I need macro for this, and I found some discussion on this subject, but I didnt find how to calculate number of row in each object and to add other object for example two row below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm grateful on any help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 09:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644045#M235990</guid>
      <dc:creator />
      <dc:date>2014-06-09T09:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel - Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644046#M235991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is multiple objects in multiple sheets, why would you need to calculate rows to place another object below it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 09:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644046#M235991</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-09T09:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel - Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644047#M235992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because I dont know in advance number of rows in each object. I need to export 100 object (straight table, pivot table, text object) in more then 10 sheets in Excel, and some of them will dynamicly change over time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 09:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644047#M235992</guid>
      <dc:creator />
      <dc:date>2014-06-09T09:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Export to Excel - Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644048#M235993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you find this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 09:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644048#M235993</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-09T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel - Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644049#M235994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, and this works fine, but he set that first object start at A1 cell and next at A20 cell..., and in my case I want to count number of rows in fisrt object and to set second object to start at two rows below.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 09:54:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644049#M235994</guid>
      <dc:creator />
      <dc:date>2014-06-09T09:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel - Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644050#M235995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code below count number of rows and add next object 3 rows below, but this code add object only on one sheet.&lt;/P&gt;&lt;P&gt;Can someone help me to add some code that will make another sheet and add some object on it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub test&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Set the path where the excel will be saved&lt;/P&gt;&lt;P&gt;filePath = "C:\Users\stomasevic\Desktop\Test.xlsx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Create the Excel spreadsheet&lt;/P&gt;&lt;P&gt;Set excelFile = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;excelFile.Visible = true&lt;/P&gt;&lt;P&gt;'Create the WorkBook&lt;/P&gt;&lt;P&gt;Set curWorkBook = excelFile.WorkBooks.Add&lt;/P&gt;&lt;P&gt;'Create the Sheet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'first chart object&lt;/P&gt;&lt;P&gt;Set curSheet = curWorkBook.WorkSheets(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;chartArray = Array("CH421","CH11", "CH12")&lt;/P&gt;&lt;P&gt;usedRows=0&lt;/P&gt;&lt;P&gt;For Each chart In chartArray&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set i = ActiveDocument.GetSheetObject(chart)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; chartCaption = i.GetCaption.Name.v&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Cells(usedRows+1, 1)=chartCaption&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Cells(usedRows+3, 1).Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Paste&lt;/P&gt;&lt;P&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;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;'loop end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;excelFile.Visible = true&lt;/P&gt;&lt;P&gt;'Save the file and quit excel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curWorkBook.SaveAs filePath&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curWorkBook.Close&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelFile.Quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Cleanup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set curWorkBook = nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set excelFile = nothing&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 10:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644050#M235995</guid>
      <dc:creator />
      <dc:date>2014-06-09T10:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Export to Excel - Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644051#M235996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Coming back to your question: how to get no os rows: Use GetNoOfRows like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;set chart = ActiveDocument.Sheets("Main").CreateStraightTable&lt;/P&gt;
&lt;P&gt;chart.AddDimension "Class"&lt;/P&gt;
&lt;P&gt;chart.AddDimension "Member"&lt;/P&gt;
&lt;P&gt;chart.AddExpression "only(MemberComment)"&lt;/P&gt;
&lt;P&gt;msgbox("number of class members = "&amp;amp;chart.&lt;STRONG&gt;GetNoOfRows&lt;/STRONG&gt;)&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2014 10:02:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-Excel-Macro/m-p/644051#M235996</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-09T10:02:49Z</dc:date>
    </item>
  </channel>
</rss>

