<?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 Exporting to Excel and Selection Issues in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exporting-to-Excel-and-Selection-Issues/m-p/555125#M693759</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to automate export a table to multiple excel worksheets. In each sheet is a different selection collection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue I have encountered is that intially I want to select all customers that start with "ABC" (which is straightforward) but then select all customers not starting with "ABC" and export these to the next excel worksheet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this line in the macro but it does not appear to behave in the same way as manually using select excluded in the application -&lt;/P&gt;&lt;P&gt;ActiveDocument.GetField("CustomerName").SelectExcluded &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to write a line in the macro that would select all "CustomerName"s not beginning with "ABC"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13733629122732586" jivemacro_uid="_13733629122732586"&gt;&lt;SPAN style="font-size: 8pt;"&gt;sub ReportExport&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;set XLApp = CreateObject("Excel.Application")&lt;BR /&gt;&lt;BR /&gt;XLApp.Visible = false&lt;BR /&gt;set XLDoc = XLApp.Workbooks.Add&lt;BR /&gt;&lt;BR /&gt;'Bring total of sheets upto 4&lt;BR /&gt;XLDoc.Worksheets.Add()&lt;BR /&gt;&lt;BR /&gt;XLDoc.Sheets(1).Name = "Report1"&lt;BR /&gt;ActiveDocument.GetSheetObject("CH162").CopyTableToClipboard true&lt;BR /&gt;XLDoc.Sheets(1).Paste()&lt;BR /&gt;&lt;BR /&gt;XLDoc.Sheets(1).Rows("1:5000").EntireRow.AutoFit&lt;BR /&gt;&lt;BR /&gt;XLApp.Visible = true&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Set C=ActiveDocument.Getfield("ChannelName")&lt;BR /&gt;C.Select "Channel1"&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;ActiveDocument.GetField("CustomerName").SelectExcluded ' Does not appear to work as it would in the application&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; 'Export Report to next sheet etc&lt;BR /&gt; &lt;BR /&gt; msgbox "Done"&lt;BR /&gt;&lt;BR /&gt;end sub &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jul 2013 09:52:59 GMT</pubDate>
    <dc:creator>felix18807</dc:creator>
    <dc:date>2013-07-09T09:52:59Z</dc:date>
    <item>
      <title>Exporting to Excel and Selection Issues</title>
      <link>https://community.qlik.com/t5/QlikView/Exporting-to-Excel-and-Selection-Issues/m-p/555125#M693759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to automate export a table to multiple excel worksheets. In each sheet is a different selection collection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue I have encountered is that intially I want to select all customers that start with "ABC" (which is straightforward) but then select all customers not starting with "ABC" and export these to the next excel worksheet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this line in the macro but it does not appear to behave in the same way as manually using select excluded in the application -&lt;/P&gt;&lt;P&gt;ActiveDocument.GetField("CustomerName").SelectExcluded &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to write a line in the macro that would select all "CustomerName"s not beginning with "ABC"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13733629122732586" jivemacro_uid="_13733629122732586"&gt;&lt;SPAN style="font-size: 8pt;"&gt;sub ReportExport&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;set XLApp = CreateObject("Excel.Application")&lt;BR /&gt;&lt;BR /&gt;XLApp.Visible = false&lt;BR /&gt;set XLDoc = XLApp.Workbooks.Add&lt;BR /&gt;&lt;BR /&gt;'Bring total of sheets upto 4&lt;BR /&gt;XLDoc.Worksheets.Add()&lt;BR /&gt;&lt;BR /&gt;XLDoc.Sheets(1).Name = "Report1"&lt;BR /&gt;ActiveDocument.GetSheetObject("CH162").CopyTableToClipboard true&lt;BR /&gt;XLDoc.Sheets(1).Paste()&lt;BR /&gt;&lt;BR /&gt;XLDoc.Sheets(1).Rows("1:5000").EntireRow.AutoFit&lt;BR /&gt;&lt;BR /&gt;XLApp.Visible = true&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Set C=ActiveDocument.Getfield("ChannelName")&lt;BR /&gt;C.Select "Channel1"&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;ActiveDocument.GetField("CustomerName").SelectExcluded ' Does not appear to work as it would in the application&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; 'Export Report to next sheet etc&lt;BR /&gt; &lt;BR /&gt; msgbox "Done"&lt;BR /&gt;&lt;BR /&gt;end sub &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 09:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exporting-to-Excel-and-Selection-Issues/m-p/555125#M693759</guid>
      <dc:creator>felix18807</dc:creator>
      <dc:date>2013-07-09T09:52:59Z</dc:date>
    </item>
  </channel>
</rss>

