<?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 Macro to export to excel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798318#M664184</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 want to export a chart table and a pivot chart from Qlikview to an excel file. I already search to see if I can adapt some code to export my data to the excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to edit the name of the sheets. I have seen useful code on "&lt;A href="https://community.qlik.com/docs/DOC-4416"&gt;VB Macro to Loop Field (Dynamic) and Export Chart (Dynamic) to Excel &amp;amp;amp; Name Sheets by Field Value&lt;/A&gt;" the problem is that I dont understand the code and therefore it is hard for me to implement on my computer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I am using is on the .txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont even not if I am running correctly the macro. I define the button then I select the option "run macro" and then put the macro name "exportToExcel" on the edit module is where I have the code of the .txt file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be useful since I stuck, and every insight will be very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Feb 2015 17:54:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-02-12T17:54:04Z</dc:date>
    <item>
      <title>Macro to export to excel</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798318#M664184</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 want to export a chart table and a pivot chart from Qlikview to an excel file. I already search to see if I can adapt some code to export my data to the excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to edit the name of the sheets. I have seen useful code on "&lt;A href="https://community.qlik.com/docs/DOC-4416"&gt;VB Macro to Loop Field (Dynamic) and Export Chart (Dynamic) to Excel &amp;amp;amp; Name Sheets by Field Value&lt;/A&gt;" the problem is that I dont understand the code and therefore it is hard for me to implement on my computer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I am using is on the .txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont even not if I am running correctly the macro. I define the button then I select the option "run macro" and then put the macro name "exportToExcel" on the edit module is where I have the code of the .txt file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be useful since I stuck, and every insight will be very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 17:54:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798318#M664184</guid>
      <dc:creator />
      <dc:date>2015-02-12T17:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export to excel</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798319#M664185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can see this interesting document:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-3889"&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; text-decoration: underline; font-family: Calibri;"&gt;http://community.qlik.com/docs/DOC-3889&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some macro for export in excel where you can set name of sheet.&lt;/P&gt;&lt;P&gt;I hope it can help you!&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 08:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798319#M664185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-13T08:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export to excel</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798320#M664186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you put the file into a txt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am afraid I can not open the file, since I still dont have a licensed account.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 09:42:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798320#M664186</guid>
      <dc:creator />
      <dc:date>2015-02-13T09:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export to excel</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798321#M664187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, in attachment the macro explained in the post I mentioned above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 09:45:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798321#M664187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-13T09:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export to excel</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798322#M664188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information. I couldn't do it no your way, but I figured out how to do it in another way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;FUNCTION PasteObject(SolutionObject, ModelWorkbook, ModelSheetID, SheetPosition)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set MyTable = ActiveDocument.GetSheetObject(SolutionObject) 'Change CH01 to the object you want to export to Excel (Object Properties &amp;gt; General tab &amp;gt; far right)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLSheet = ModelWorkbook.Worksheets(ModelSheetID) 'Select sheet where data should be pasted&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mytable.CopyTableToClipboard true 'Copy data to Clipboard&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLSheet.Paste XLSheet.Range(SheetPosition) 'Paste data starting at A1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;END FUNCTION&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;SUB exportToExcel&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim docProp&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set docProp = ActiveDocument.GetProperties&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim tmpFile&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmpFile = docProp.MyWorkingDirectory&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLApp = CreateObject("Excel.Application")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLApp.Visible = true 'you can make it false, if you want to make it in the background&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLDoc = XLApp.Workbooks.Open(tmpFile &amp;amp; "\TestFileToSave.xlsx")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PasteObject "CH02", XLDoc, 3, "A1"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PasteObject "CH05", XLDoc, 2, "A1"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.ActivateSheetByID "SH01" &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set XLSheet2 = XLDoc.Worksheets(1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.GetSheetObject("CH08").CopyBitmapToClipboard()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLSheet2.Paste XLSheet2.Range("A1")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.GetSheetObject("CH06").CopyBitmapToClipboard()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XLSheet2.Paste XLSheet2.Range("A28")&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14pt;"&gt;END SUB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However my images (objects CH06 and CH08) have poor quality. I tried to use PasteSpecial but it gives some kind of error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to out like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14pt;"&gt;XLSheet2.PasteSpecial(3) XLSheet2.Range("A1")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But it says "&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;Expected end of statement&lt;/SPAN&gt;"&lt;/STRONG&gt;​. How can I do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 17:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-to-excel/m-p/798322#M664188</guid>
      <dc:creator />
      <dc:date>2015-02-18T17:40:27Z</dc:date>
    </item>
  </channel>
</rss>

