<?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 object to excel /text file macro trigger on a field selection? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358735#M133114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is the macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub CopyToXL2&lt;/P&gt;&lt;P&gt;set XLApp = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;XLApp.Visible = FALSE&lt;/P&gt;&lt;P&gt;set XLDoc = XLApp.Workbooks.Add&lt;/P&gt;&lt;P&gt;XLDoc.Sheets(1).name = "Supervisor Report"&lt;/P&gt;&lt;P&gt;set XLSheet = XLDoc.Worksheets(1)&lt;/P&gt;&lt;P&gt;set MyTable = ActiveDocument.GetSheetObject("CH02")&lt;/P&gt;&lt;P&gt;set XLSheet = XLDoc.Worksheets(1)&lt;/P&gt;&lt;P&gt;MyTable.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;XLSheet.Paste XLSheet.Range("A1")&lt;/P&gt;&lt;P&gt;XLDoc.SaveAs "C:\Users\igal\Documents\BU\MyRep.xlsx"&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; 'Choose the file path you like&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XLApp.Visible = False&lt;/P&gt;&lt;P&gt;XLApp.Quit&lt;/P&gt;&lt;P&gt;Set XLApp = Nothing&lt;/P&gt;&lt;P&gt;Set Table = Nothing&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End then go to-&amp;gt;Settings-&amp;gt;Document Properties-&amp;gt;Triggers-&amp;gt;Field Event Trigger&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2012 18:54:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-03-19T18:54:59Z</dc:date>
    <item>
      <title>Export object to excel /text file macro trigger on a field selection?</title>
      <link>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358734#M133113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Any one know how to write a macro to export the object to excel or text file for Field trigger?I want to keep on exporting the data to same excel/text file created for any selection.I don't want to replace the file whenever different values in the field are selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 18:29:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358734#M133113</guid>
      <dc:creator />
      <dc:date>2012-03-19T18:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Export object to excel /text file macro trigger on a field selection?</title>
      <link>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358735#M133114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is the macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub CopyToXL2&lt;/P&gt;&lt;P&gt;set XLApp = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;XLApp.Visible = FALSE&lt;/P&gt;&lt;P&gt;set XLDoc = XLApp.Workbooks.Add&lt;/P&gt;&lt;P&gt;XLDoc.Sheets(1).name = "Supervisor Report"&lt;/P&gt;&lt;P&gt;set XLSheet = XLDoc.Worksheets(1)&lt;/P&gt;&lt;P&gt;set MyTable = ActiveDocument.GetSheetObject("CH02")&lt;/P&gt;&lt;P&gt;set XLSheet = XLDoc.Worksheets(1)&lt;/P&gt;&lt;P&gt;MyTable.CopyTableToClipboard true&lt;/P&gt;&lt;P&gt;XLSheet.Paste XLSheet.Range("A1")&lt;/P&gt;&lt;P&gt;XLDoc.SaveAs "C:\Users\igal\Documents\BU\MyRep.xlsx"&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; 'Choose the file path you like&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XLApp.Visible = False&lt;/P&gt;&lt;P&gt;XLApp.Quit&lt;/P&gt;&lt;P&gt;Set XLApp = Nothing&lt;/P&gt;&lt;P&gt;Set Table = Nothing&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End then go to-&amp;gt;Settings-&amp;gt;Document Properties-&amp;gt;Triggers-&amp;gt;Field Event Trigger&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 18:54:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358735#M133114</guid>
      <dc:creator />
      <dc:date>2012-03-19T18:54:59Z</dc:date>
    </item>
    <item>
      <title>Export object to excel /text file macro trigger on a field selection?</title>
      <link>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358736#M133115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you very much Yigal for quick response.I am not a macro person.The macro works good.But it is every time asking me whether to replace the old excel file or not? I want to add the data to the existing excel if&amp;nbsp; another selection is made.And it also generates two sheets.One the object i needed and the other the selection table.I want only the object.Actually I am making a selection in one object and trying to export the data from another object based on the selection.I have read some where in community little bit similar to my question &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/200603"&gt;http://community.qlik.com/message/200603&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we use AppendExport also to do similar thing with the data exported to the same excel sheet whenever the field selected?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 19:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358736#M133115</guid>
      <dc:creator />
      <dc:date>2012-03-19T19:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Export object to excel /text file macro trigger on a field selection?</title>
      <link>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358737#M133116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yigal I have attached your application with notes about how I want to do the export.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 19:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358737#M133116</guid>
      <dc:creator />
      <dc:date>2012-03-19T19:41:51Z</dc:date>
    </item>
    <item>
      <title>Export object to excel /text file macro trigger on a field selection?</title>
      <link>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358738#M133117</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;If you want to export data to excel, the folowing article could be useful for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.codeproject.com/KB/cs/Excel_PDF_Word_ExportWiz.aspx?msg=3768323#xx3768323xx"&gt;http://www.codeproject.com/KB/cs/Excel_PDF_Word_ExportWiz.aspx?msg=3768323#xx3768323xx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 03:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-object-to-excel-text-file-macro-trigger-on-a-field/m-p/358738#M133117</guid>
      <dc:creator />
      <dc:date>2012-03-22T03:03:44Z</dc:date>
    </item>
  </channel>
</rss>

