<?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 Help with Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Macro/m-p/379463#M1170896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very sad. I had a solution for my problem, but then my pc is crashed without saving anything &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to export one table of QlikView to an excel-file in an already existed sheet called "data sheet" because in the other sheets of the file are expressions which are used cells of this one. So I can't delete the existed sheet and add a new one with the same name. This doesn't work; the error is reference! then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code opens the excel-file, saves it and closes it, but it doesn't add the table &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&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_13455581538711250" jivemacro_uid="_13455581538711250"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;sub ExportExcel()&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Set xlApp = CreateObject("Excel.Application")&lt;BR /&gt;xlApp.Visible = true&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Set xlDoc = xlApp.Workbooks.Open("C:\test.xls")&lt;BR /&gt;xlApp.DisplayAlerts = false &lt;BR /&gt;&lt;BR /&gt;Set SheetObj = ActiveDocument.GetSheetObject("CH09")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;SheetObj.CopyTableToClipboard true&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Set xlSheet = xlDoc.Sheets("data sheet")&lt;BR /&gt;xlDoc.Sheets("data sheet").Range("A1").Select&lt;BR /&gt;xlDoc.Sheets("data sheet").Paste&lt;BR /&gt;&lt;BR /&gt;xlApp.ActiveWorkBook.Save &lt;BR /&gt;xlDoc.Close&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;xlApp.Quit&lt;BR /&gt;&lt;BR /&gt;End sub &lt;/P&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's wrong with it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards vicky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2012 14:11:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-21T14:11:18Z</dc:date>
    <item>
      <title>Help with Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Macro/m-p/379463#M1170896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very sad. I had a solution for my problem, but then my pc is crashed without saving anything &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to export one table of QlikView to an excel-file in an already existed sheet called "data sheet" because in the other sheets of the file are expressions which are used cells of this one. So I can't delete the existed sheet and add a new one with the same name. This doesn't work; the error is reference! then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code opens the excel-file, saves it and closes it, but it doesn't add the table &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&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_13455581538711250" jivemacro_uid="_13455581538711250"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;sub ExportExcel()&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Set xlApp = CreateObject("Excel.Application")&lt;BR /&gt;xlApp.Visible = true&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Set xlDoc = xlApp.Workbooks.Open("C:\test.xls")&lt;BR /&gt;xlApp.DisplayAlerts = false &lt;BR /&gt;&lt;BR /&gt;Set SheetObj = ActiveDocument.GetSheetObject("CH09")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;SheetObj.CopyTableToClipboard true&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Set xlSheet = xlDoc.Sheets("data sheet")&lt;BR /&gt;xlDoc.Sheets("data sheet").Range("A1").Select&lt;BR /&gt;xlDoc.Sheets("data sheet").Paste&lt;BR /&gt;&lt;BR /&gt;xlApp.ActiveWorkBook.Save &lt;BR /&gt;xlDoc.Close&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;xlApp.Quit&lt;BR /&gt;&lt;BR /&gt;End sub &lt;/P&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's wrong with it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards vicky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 14:11:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Macro/m-p/379463#M1170896</guid>
      <dc:creator />
      <dc:date>2012-08-21T14:11:18Z</dc:date>
    </item>
  </channel>
</rss>

