<?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: Help with ExportToExcel Macro in QlikView in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-ExportToExcel-Macro-in-QlikView/m-p/2027443#M1222244</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/152684"&gt;@RJW&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for posting.&lt;/P&gt;
&lt;P&gt;What is the business case here?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shouldn't this be done via NPrinting on-demand reports or regular reports that would give you more features, flexibility and have a wider use cases for your end-customer.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Albert&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 19:32:26 GMT</pubDate>
    <dc:creator>Albert_Candelario</dc:creator>
    <dc:date>2023-01-18T19:32:26Z</dc:date>
    <item>
      <title>Help with ExportToExcel Macro in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-ExportToExcel-Macro-in-QlikView/m-p/2027306#M1222242</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I currently have a macro connected to a button in QlikView that exports 3 objects to Excel (pivot table, straight table, and a current selections box). The code and button work as intended, but I would like to export the 3 objects all to the same Excel file, rather than 3 separate ones.&lt;/P&gt;
&lt;P&gt;I've tried to create a subroutine that attempts to do this but am getting an error that I can't quite seem to fix. Also, I've tried using the CopyToClipboard method but I am having similar issues. The ExportToExcel is the only method that seems to work for me.&lt;/P&gt;
&lt;P&gt;Working code that exports the objects to 3 sperate files:&lt;/P&gt;
&lt;PRE&gt;Sub Export&lt;BR /&gt;Set Chart = ActiveDocument.GetSheetObject("RAW")&lt;BR /&gt;Set P = Chart.GetProperties&lt;BR /&gt;Chart.SendToExcel&lt;BR /&gt;&lt;BR /&gt;Set Chart = ActiveDocument.GetSheetObject("PIVOT")&lt;BR /&gt;Set P = Chart.GetProperties&lt;BR /&gt;Chart.SendToExcel&lt;BR /&gt;&lt;BR /&gt;Set Chart = ActiveDocument.GetSheetObject("CS08")&lt;BR /&gt;Set P = Chart.GetProperties&lt;BR /&gt;Chart.SendToExcel&lt;BR /&gt;End Sub&lt;/PRE&gt;
&lt;P&gt;Testing export to 3 separate sheets in the same file (not working):&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;Sub Export_Testing&lt;BR /&gt;Set objExcel = CreateObject("Excel.Application")&lt;BR /&gt;objExcel.Visible = true&lt;BR /&gt;&lt;BR /&gt;'Create a new workbook&lt;BR /&gt;Set objWorkbook = objExcel.Workbooks.Add()&lt;BR /&gt;&lt;BR /&gt;'Create a new sheet for the table object&lt;BR /&gt;Set objSheet1 = objWorkbook.Sheets.Add()&lt;BR /&gt;objSheet1.Name = "RAW"&lt;BR /&gt;Set Chart = ActiveDocument.GetSheetObject("RAW")&lt;BR /&gt;Set P = Chart.GetProperties&lt;BR /&gt;Chart.SendToExcel objSheet1.Range("A1")&lt;BR /&gt;&lt;BR /&gt;'Create a new sheet for the pivot object&lt;BR /&gt;Set objSheet2 = objWorkbook.Sheets.Add()&lt;BR /&gt;objSheet2.Name = "PIVOT"&lt;BR /&gt;Set Pivot = ActiveDocument.GetSheetObject("PIVOT")&lt;BR /&gt;Pivot.SendToExcel objSheet2.Range("A1")&lt;BR /&gt;&lt;BR /&gt;'Create a new sheet for the CS08 object&lt;BR /&gt;Set objSheet3 = objWorkbook.Sheets.Add()&lt;BR /&gt;objSheet3.Name = "Filters"&lt;BR /&gt;Set CS08 = ActiveDocument.GetSheetObject("CS08")&lt;BR /&gt;CS08.SendToExcel objSheet3.Range("A1")&lt;BR /&gt;End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The error message comes along during the first attempt at sending the RAW table to Excel. It gives the following error: "Wrong number of arguments or invalid property assignment: 'Chart.SendToExcel'".&amp;nbsp; I should also mention I have given the QlikView file full security access in the document properties, CTRL + Shift + M settings have been allowed full system access, and this has been verified in the module menu as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 16:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-ExportToExcel-Macro-in-QlikView/m-p/2027306#M1222242</guid>
      <dc:creator>RJW</dc:creator>
      <dc:date>2023-01-18T16:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with ExportToExcel Macro in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-ExportToExcel-Macro-in-QlikView/m-p/2027443#M1222244</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/152684"&gt;@RJW&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for posting.&lt;/P&gt;
&lt;P&gt;What is the business case here?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shouldn't this be done via NPrinting on-demand reports or regular reports that would give you more features, flexibility and have a wider use cases for your end-customer.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Albert&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 19:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-ExportToExcel-Macro-in-QlikView/m-p/2027443#M1222244</guid>
      <dc:creator>Albert_Candelario</dc:creator>
      <dc:date>2023-01-18T19:32:26Z</dc:date>
    </item>
  </channel>
</rss>

