<?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: vlax-get-object creates new Excel instance even when a workbook is open in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9310452#M78652</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2961384"&gt;@deheylen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I did try that and I get the same result: a new instance of Excel is created rather than linking to the existing instance.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I cannot replicate this .. I'm also on 2016 version though.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 15:47:00 GMT</pubDate>
    <dc:creator>ronjonp</dc:creator>
    <dc:date>2020-02-11T15:47:00Z</dc:date>
    <item>
      <title>vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9308077#M78648</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am trying to retrieve the current selection from an open excel workbook. When I run this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(setq ^ExcelApp (vlax-get-object "Excel.Application"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it creates a new, empty instance of excel even though there is already one running. I'm using AutoCAD MEP 2018 and Excel 2010. Is this a bug in VisualLisp or am I doing something wrong? If it's a bug are there any workarounds?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help that can be offered with this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 18:13:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9308077#M78648</guid>
      <dc:creator>deheylen</dc:creator>
      <dc:date>2020-02-10T18:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9308120#M78649</link>
      <description>&lt;P&gt;Have you tried this?&lt;/P&gt;&lt;PRE&gt;(setq ^ExcelApp (vlax-get-or-create-object "Excel.Application"))&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 18:31:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9308120#M78649</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-02-10T18:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9308454#M78650</link>
      <description>&lt;P&gt;I did try that and I get the same result: a new instance of Excel is created rather than linking to the existing instance.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 20:45:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9308454#M78650</guid>
      <dc:creator>deheylen</dc:creator>
      <dc:date>2020-02-10T20:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9309135#M78651</link>
      <description>&lt;P&gt;Have a look at the start of this code. its a bit long winded many lines not just a couple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 05:09:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9309135#M78651</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-02-11T05:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9310452#M78652</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2961384"&gt;@deheylen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I did try that and I get the same result: a new instance of Excel is created rather than linking to the existing instance.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I cannot replicate this .. I'm also on 2016 version though.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 15:47:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9310452#M78652</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-02-11T15:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9728011#M78653</link>
      <description>&lt;P&gt;Did you ever find a solution to this? I'm having the same issue on a specific machine. vlax-get-or-create-object ends up creating a new Excel.Application object instead of getting the current one. Both machines are running Office 365 but behave differently. The only difference is, one runs ACAD 2018, and the problematic one runs ACAD 2020.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 16:06:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9728011#M78653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-03T16:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9729024#M78654</link>
      <description>&lt;P&gt;I had some other code and it did a check is excel open if not open it will try to find its a variation on the&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq *ExcelApp% (vlax-get-or-create-object "Excel.Application"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;: (setq excel-app (vlax-get-or-create-object "excel.application")
(_&amp;gt;      wb-collection (vlax-get excel-app "workbooks"))
#&amp;lt;VLA-OBJECT Workbooks 0000000023950548&amp;gt;
: (vlax-dump-object wb-collection)
; Workbooks 23950548 : 
; Property values :
;   Application (RO) = #&amp;lt;VLA-OBJECT _Application 0000000023951268&amp;gt;
;   Count (RO) = 1

Count will be 0 if no excel open but if no workbooks also may return same value. Nil names. So a double check count /=0 and wb not ""

(vlax-for wb wb-collection
	(princ     (vla-get-fullname wb))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 05:00:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/9729024#M78654</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-09-04T05:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: vlax-get-object creates new Excel instance even when a workbook is open</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/10013925#M78655</link>
      <description>&lt;P&gt;I have run into the same issue. In the past, I could typically fix it by restarting my computer (I tend to leave it on for weeks at a time.) However, it seems that won't fix the issue anymore with the latest version of Office 365. Autocad now seems unable to detect that Excel is indeed open when not opening Excel via VLAX commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This makes it impossible to handle Excel files in an orderly fashion through AutoCAD visual commands and completely ruins many of my Excel handling scripts (or at least requires the user to close all Excel files before running the scripts.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There might be some Microsoft excel security feature that is blocking the information?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 19:46:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vlax-get-object-creates-new-excel-instance-even-when-a-workbook/m-p/10013925#M78655</guid>
      <dc:creator>MrJSmith</dc:creator>
      <dc:date>2021-01-19T19:46:28Z</dc:date>
    </item>
  </channel>
</rss>

