<?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 Is it still true that the AutoCAD NET API does not give access to embedded Excel in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8911401#M21814</link>
    <description>&lt;P&gt;Is it still true that the AutoCAD NET API does not give access to embedded Excel worksheets?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked and looked and there is some complicated MFC stuff for a &lt;EM&gt;&lt;U&gt;linked&lt;/U&gt; &lt;/EM&gt;Excel file but I can find no real help for &lt;U&gt;&lt;EM&gt;embedded&lt;/EM&gt; &lt;/U&gt;Excel files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In code I've got as far as this:&lt;/P&gt;&lt;PRE&gt;                            foreach (ObjectId id in btr)
                            {
                                if (id.ObjectClass.Name == "AcDbOle2Frame")
                                try
                                {
                                    Ole2Frame oleFrame = tr.GetObject(id, OpenMode.ForRead) as Ole2Frame;

                                    //object excel = oleFrame.OleObject;
                                    // Excel.Workbook EmbeddedExcel = (Excel.Workbook)oleFrame.OleObject.GetType();
                                    Type eType = oleFrame.OleObject.GetType();
                                    string sMsg = "found OLE object  = " + eType.ToString() ;
                                    LogWriter.LogWrite(sMsg);
                                }
                                catch (System.Exception e)
                                {
                                    string sMsg = string.Format("Exception ExcelChanger: {0}", e.Message);
                                    System.Windows.Forms.MessageBox.Show(sMsg);
                                    LogWriter.LogWrite(sMsg);
                                }
                            }&lt;/PRE&gt;&lt;P&gt;...but any attempt to do anything useful results in a COM HRESULT error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2019 09:09:27 GMT</pubDate>
    <dc:creator>oransen</dc:creator>
    <dc:date>2019-07-16T09:09:27Z</dc:date>
    <item>
      <title>Is it still true that the AutoCAD NET API does not give access to embedded Excel</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8911401#M21814</link>
      <description>&lt;P&gt;Is it still true that the AutoCAD NET API does not give access to embedded Excel worksheets?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked and looked and there is some complicated MFC stuff for a &lt;EM&gt;&lt;U&gt;linked&lt;/U&gt; &lt;/EM&gt;Excel file but I can find no real help for &lt;U&gt;&lt;EM&gt;embedded&lt;/EM&gt; &lt;/U&gt;Excel files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In code I've got as far as this:&lt;/P&gt;&lt;PRE&gt;                            foreach (ObjectId id in btr)
                            {
                                if (id.ObjectClass.Name == "AcDbOle2Frame")
                                try
                                {
                                    Ole2Frame oleFrame = tr.GetObject(id, OpenMode.ForRead) as Ole2Frame;

                                    //object excel = oleFrame.OleObject;
                                    // Excel.Workbook EmbeddedExcel = (Excel.Workbook)oleFrame.OleObject.GetType();
                                    Type eType = oleFrame.OleObject.GetType();
                                    string sMsg = "found OLE object  = " + eType.ToString() ;
                                    LogWriter.LogWrite(sMsg);
                                }
                                catch (System.Exception e)
                                {
                                    string sMsg = string.Format("Exception ExcelChanger: {0}", e.Message);
                                    System.Windows.Forms.MessageBox.Show(sMsg);
                                    LogWriter.LogWrite(sMsg);
                                }
                            }&lt;/PRE&gt;&lt;P&gt;...but any attempt to do anything useful results in a COM HRESULT error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 09:09:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8911401#M21814</guid>
      <dc:creator>oransen</dc:creator>
      <dc:date>2019-07-16T09:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is it still true that the AutoCAD NET API does not give access to embedded E</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8912883#M21815</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1206331"&gt;@oransen&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you decide to throw consume Excel/Access files as OleDb, you need as a prerequisite to install the &lt;A href="https://www.arclab.com/en/kb/csharp/connection-string-enumerate-odbc-drivers-access-excel.html" target="_blank" rel="noopener"&gt;connector/driver&lt;/A&gt;, it's r&lt;SPAN style="font-family: inherit;"&gt;egardless of the AutoCAD .NET API.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, &lt;A href="https://adndevblog.typepad.com/autocad/2012/04/update-linked-ole-object-from-net.html" target="_blank" rel="noopener"&gt;Adam Nagy explains&lt;/A&gt; about approch as similar as your shared code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Att,&lt;/P&gt;&lt;P&gt;Antonio Leonardo&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="exam-483-programming-in-c.png" style="width: 125px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/643997iBF3FA825B80C7800/image-size/small?v=v2&amp;amp;px=200" role="button" title="exam-483-programming-in-c.png" alt="exam-483-programming-in-c.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 20:39:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8912883#M21815</guid>
      <dc:creator>antonio.leonardo</dc:creator>
      <dc:date>2019-07-16T20:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is it still true that the AutoCAD NET API does not give access to embedded E</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8913622#M21816</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6990272"&gt;@antonio.leonardo&lt;/a&gt;&amp;nbsp; thanks for the pointers...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 07:00:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8913622#M21816</guid>
      <dc:creator>oransen</dc:creator>
      <dc:date>2019-07-17T07:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is it still true that the AutoCAD NET API does not give access to embedded E</title>
      <link>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8914577#M21817</link>
      <description>&lt;P&gt;You're welcome!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 14:01:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/is-it-still-true-that-the-autocad-net-api-does-not-give-access/m-p/8914577#M21817</guid>
      <dc:creator>antonio.leonardo</dc:creator>
      <dc:date>2019-07-17T14:01:09Z</dc:date>
    </item>
  </channel>
</rss>

