<?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: Automatic overwrite excel file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427347#M487997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerrit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your macro, replace the line:&lt;/P&gt;&lt;P&gt;curWorkBook.SaveAs filePath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the 3 lines I posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just to disable the overwrite confirmation window that normally appears, and reenable it afterwards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2013 17:47:05 GMT</pubDate>
    <dc:creator>fosuzuki</dc:creator>
    <dc:date>2013-01-16T17:47:05Z</dc:date>
    <item>
      <title>Automatic overwrite excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427344#M487994</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;I create an excel file out of QlikView with a macro.&lt;/P&gt;&lt;P&gt;How can i get to automatic overwrite the file with a same name on my harddisk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all fot answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerrit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macro i have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sub ExcelExpwCaption&lt;BR /&gt;'Set the path where the excel will be saved &lt;BR /&gt;filePath = "C:\Voorraadanalyse"&lt;BR /&gt;&lt;BR /&gt;'Create the Excel spreadsheet &lt;BR /&gt;Set excelFile = CreateObject("Excel.Application")&lt;BR /&gt;excelFile.Visible = true&lt;BR /&gt;'Create the WorkBook&lt;BR /&gt;Set curWorkBook = excelFile.WorkBooks.Add&lt;BR /&gt;'Create the Sheet&lt;BR /&gt;Set curSheet = curWorkBook.WorkSheets(1)&lt;BR /&gt;&lt;BR /&gt;'Get the chart we want to export&lt;BR /&gt;Set tableToExport = ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;Set chartProperties = tableToExport.GetProperties&lt;BR /&gt;tableToExport.CopyTableToClipboard true&lt;BR /&gt;&lt;BR /&gt;'Get the caption&lt;BR /&gt;chartCaption = tableToExport.GetCaption.Name.v&lt;BR /&gt;'MsgBox chartCaption&lt;BR /&gt;&lt;BR /&gt;'Set the first cell with the caption&lt;BR /&gt;curSheet.Range("A1") = chartCaption&lt;BR /&gt;'Paste the rest of the chart&lt;BR /&gt;curSheet.Paste curSheet.Range("A2")&lt;BR /&gt;excelFile.Visible = true&lt;BR /&gt;&lt;BR /&gt;'Save the file and quit excel&lt;BR /&gt;curWorkBook.SaveAs filePath&lt;BR /&gt;curWorkBook.Close&lt;BR /&gt;excelFile.Quit&lt;BR /&gt;&lt;BR /&gt;'Cleanup&lt;BR /&gt;Set curWorkBook = nothing&lt;BR /&gt;Set excelFile = nothing&lt;BR /&gt;'XLApp.Quit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;End Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 15:00:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427344#M487994</guid>
      <dc:creator />
      <dc:date>2013-01-16T15:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic overwrite excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427345#M487995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;excelFile.DisplayAlerts = False &lt;/P&gt;&lt;P&gt;curWorkBook.SaveAs filePath&lt;/P&gt;&lt;P&gt;excelFile.DisplayAlerts = True &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 15:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427345#M487995</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2013-01-16T15:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic overwrite excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427346#M487996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this answer. &lt;SPAN class="hps"&gt;I'll&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;try&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;it&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;tomorrow.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Have i fil this rules in my macro under:&amp;nbsp; &lt;STRONG&gt;'save the file and quit excel'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;or&lt;/SPAN&gt;&amp;nbsp; are &lt;SPAN class="hps"&gt;these&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;rules&lt;/SPAN&gt;&amp;nbsp; a &lt;SPAN class="hps"&gt;complementation on&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the macro? if so: where.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;SPAN class="hps"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Thanks&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in advance for&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;your answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Gerrit&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 17:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427346#M487996</guid>
      <dc:creator />
      <dc:date>2013-01-16T17:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic overwrite excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427347#M487997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerrit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your macro, replace the line:&lt;/P&gt;&lt;P&gt;curWorkBook.SaveAs filePath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the 3 lines I posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just to disable the overwrite confirmation window that normally appears, and reenable it afterwards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 17:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427347#M487997</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2013-01-16T17:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic overwrite excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427348#M487998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;I've&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;tried&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;your&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;solution&lt;/SPAN&gt;&lt;/SPAN&gt;. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;Unfortunately, it does&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;not&lt;/SPAN&gt;&lt;/SPAN&gt; work. &lt;/P&gt;&lt;P&gt;Excel ask me to overwrite the file because there is already a file with the same name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;o you have&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;any idea&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;what the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;solution might be.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Thanks&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in advance for&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;your answer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Gerrit&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 06:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427348#M487998</guid>
      <dc:creator />
      <dc:date>2013-01-17T06:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic overwrite excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427349#M487999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before the line&lt;/P&gt;&lt;P&gt;excelFile.DisplayAlerts = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert the code:&lt;/P&gt;&lt;P&gt;excelFile.Visible = false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that you don't need the line "&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;excelFile.DisplayAlerts = True"&lt;/SPAN&gt; which I suggested earlier. Right after that you kill the Excel app, so it make no difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 19:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427349#M487999</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2013-01-17T19:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic overwrite excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427350#M488000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning Fernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro I have now is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;Sub Exporteerd_naar_Excel_met_een_titel&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filePath = "C:\Voorraadanalyse.xls"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set excelFile = CreateObject("Excel.Application")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelFile.Visible = false&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set curWorkBook = excelFile.WorkBooks.Add&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set curSheet = curWorkBook.WorkSheets(1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set tableToExport = ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set chartProperties = tableToExport.GetProperties&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableToExport.CopyTableToClipboard true&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; chartCaption = tableToExport.GetCaption.Name.v&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Range("A1") = chartCaption&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Paste curSheet.Range("A2")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelFile.Visible = false&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelFile.DisplayAlerts = False&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelFile.Visible = false&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curWorkBook.SaveAs filePath&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curWorkBook.Close&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelFile.Quit&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set curWorkBook = nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set excelFile = nothing&lt;BR /&gt; End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this one is working.&lt;/P&gt;&lt;P&gt;Thanks for all your advise. It's great to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerrit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 06:39:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automatic-overwrite-excel-file/m-p/427350#M488000</guid>
      <dc:creator />
      <dc:date>2013-01-18T06:39:32Z</dc:date>
    </item>
  </channel>
</rss>

