<?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 Open an Excel object in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227147#M79284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Do you know why when I execute this only macro line :&lt;/P&gt;&lt;P&gt;set ExcelApp = createobject("Excel.Application")&lt;/P&gt;&lt;P&gt;Why an excel application open and close directly ? (I see it in task manager) ?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jul 2010 16:50:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-19T16:50:43Z</dc:date>
    <item>
      <title>Open an Excel object</title>
      <link>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227147#M79284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Do you know why when I execute this only macro line :&lt;/P&gt;&lt;P&gt;set ExcelApp = createobject("Excel.Application")&lt;/P&gt;&lt;P&gt;Why an excel application open and close directly ? (I see it in task manager) ?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jul 2010 16:50:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227147#M79284</guid>
      <dc:creator />
      <dc:date>2010-07-19T16:50:43Z</dc:date>
    </item>
    <item>
      <title>Open an Excel object</title>
      <link>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227148#M79285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is that the end of your macro? When your macro ends, it could release the Excel app object.&lt;/P&gt;&lt;P&gt;You are able to open an Excel object and manipulate it via macro. Here's a sample:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sub Excel_OLE_Automation&lt;BR /&gt; Set oXL=CreateObject("Excel.Application")&lt;BR /&gt; f_name=oXL.GetOpenFilename("All Files (*.*),*.*",,"Select file",False)&lt;BR /&gt; If f_name="False" then&lt;BR /&gt; 'user cancelled out of dialog box&lt;BR /&gt; Set oXL=nothing&lt;BR /&gt; Exit sub&lt;BR /&gt; End If&lt;BR /&gt; ActiveDocument.Variables("vFileName").SetContent f_name, true&lt;BR /&gt; Set oWB=oXL.Workbooks.Open(f_name)&lt;BR /&gt; Set oSH=oWB.Worksheets.Item(1)&lt;BR /&gt; oSH.Range("A2") = "12345"&lt;BR /&gt; oWB.Save&lt;BR /&gt; oWB.Close&lt;BR /&gt; Set oSH=nothing&lt;BR /&gt; Set oWB=nothing&lt;BR /&gt; Set oXL=nothing&lt;BR /&gt;End Sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jul 2010 21:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227148#M79285</guid>
      <dc:creator />
      <dc:date>2010-07-19T21:27:42Z</dc:date>
    </item>
    <item>
      <title>Open an Excel object</title>
      <link>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227149#M79286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"When your macro ends, it could release the Excel app object."&lt;/P&gt;&lt;P&gt;Really &lt;IMG alt="Tongue Tied" src="http://community.qlik.com/emoticons/emotion-7.gif" /&gt; It's not so common !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 08:46:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227149#M79286</guid>
      <dc:creator />
      <dc:date>2010-07-21T08:46:09Z</dc:date>
    </item>
    <item>
      <title>Open an Excel object</title>
      <link>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227150#M79287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, not really, I was able to open an Excel object and leave it open after the macro ended.&lt;/P&gt;&lt;P&gt;What are you trying to accomplish with your macro? I think you need to do a little more to fully open the Excel and keep it open. Are you trying to start Excel and create a new file? Do you just want to open Excel with no file?&lt;/P&gt;&lt;P&gt;Here is the minimum I was able to use to get Excel to open and stay open after the macro ended:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sub SimpleAuto&lt;BR /&gt; Set oXL=CreateObject("Excel.Application")&lt;BR /&gt; oXL.Visible = True&lt;BR /&gt;&lt;BR /&gt; f_name=oXL.GetOpenFilename("All Files (*.*),*.*",,"Select file",False)&lt;BR /&gt; If f_name="False" then 'user cancelled out of dialog box&lt;BR /&gt; Set oXL=nothing&lt;BR /&gt; Exit sub&lt;BR /&gt; End If&lt;BR /&gt;&lt;BR /&gt; Set oWB=oXL.Workbooks.Open(f_name)&lt;BR /&gt; Set oSH=oWB.Worksheets.Item(1)&lt;BR /&gt;End Sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jul 2010 17:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227150#M79287</guid>
      <dc:creator />
      <dc:date>2010-07-21T17:14:03Z</dc:date>
    </item>
    <item>
      <title>Open an Excel object</title>
      <link>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227151#M79288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally, I have no problem!&lt;BR /&gt;&lt;BR /&gt;Usually when I use a COM object for Excel (in a vbs or other), the Excel application remains active if I do not close it.&lt;BR /&gt;&lt;BR /&gt;So when I check only the line CreateObject ("Excel.Application") and I see this Excel application creating and immediately quit ... I am surprised and check if there is not a bug on my computer! I can not imagine that the VB engine in QV would close it automatically!&lt;BR /&gt;&lt;BR /&gt;So there is no problem (finally)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 10:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Open-an-Excel-object/m-p/227151#M79288</guid>
      <dc:creator />
      <dc:date>2010-07-22T10:35:24Z</dc:date>
    </item>
  </channel>
</rss>

