<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[mit vc++ auf ne excel tabelle zugreifen]]></title><description><![CDATA[<p>ja ne steht ja schon oben das problem</p>
<p>thx schonmal für eure hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/76194/mit-vc-auf-ne-excel-tabelle-zugreifen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 15:15:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/76194.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Jun 2004 16:04:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to mit vc++ auf ne excel tabelle zugreifen on Tue, 08 Jun 2004 16:04:03 GMT]]></title><description><![CDATA[<p>ja ne steht ja schon oben das problem</p>
<p>thx schonmal für eure hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/536165</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/536165</guid><dc:creator><![CDATA[Salut]]></dc:creator><pubDate>Tue, 08 Jun 2004 16:04:03 GMT</pubDate></item><item><title><![CDATA[Reply to mit vc++ auf ne excel tabelle zugreifen on Tue, 08 Jun 2004 16:14:44 GMT]]></title><description><![CDATA[<p>eventuell hilft dir das</p>
<pre><code class="language-cpp">#import &lt;mso9.dll&gt; no_namespace rename(&quot;DocumentProperties&quot;, &quot;DocumentPropertiesXL&quot;)   
#import &quot;C:\Programme\Gemeinsame Dateien\Microsoft Shared\VBA\VBA6\vbe6ext.olb&quot; no_namespace   
#import &lt;excel9.olb&gt; rename(&quot;DialogBox&quot;, &quot;DialogBoxXL&quot;) rename(&quot;RGB&quot;, &quot;RBGXL&quot;) rename(&quot;DocumentProperties&quot;, &quot;DocumentPropertiesXL&quot;) no_dual_interfaces

#pragma warning (disable:4192)
#pragma warning (disable:4146)

#include &lt;stdio.h&gt;
#include &lt;tchar.h&gt;

void dump_com_error(_com_error &amp;e)
{
    _tprintf(_T(&quot;Oops - hit an error!\n&quot;));
    _tprintf(_T(&quot;\a\tCode = %08lx\n&quot;), e.Error());
    _tprintf(_T(&quot;\a\tCode meaning = %s\n&quot;), e.ErrorMessage());
    _bstr_t bstrSource(e.Source());
    _bstr_t bstrDescription(e.Description());
    _tprintf(_T(&quot;\a\tSource = %s\n&quot;), (LPCTSTR) bstrSource);
    _tprintf(_T(&quot;\a\tDescription = %s\n&quot;), (LPCTSTR) bstrDescription);
}

struct StartOle {
    StartOle() { CoInitialize(NULL); }
    ~StartOle() { CoUninitialize(); }
} _inst_StartOle;

void main()
{
    using namespace Excel;

    _ApplicationPtr pXL;
    try {

    if (pXL.GetInterfacePtr() == NULL) pXL.CreateInstance(L&quot;Excel.Application.9&quot;); //check ob es schon laeuft

    pXL-&gt;Visible = VARIANT_TRUE;
//    pXL-&gt;Visible = VARIANT_FALSE;

    WorkbooksPtr pBooks;
    _WorkbookPtr pBook;    
    WorksheetsPtr pSheets;
    _WorksheetPtr pSheet;

    pBooks= pXL-&gt;Workbooks;
    pBook = pBooks-&gt;Add((long)Excel::xlWorksheet);    //vohandenes Dokument mit pBooks-&gt;Open(&quot;c:\\test.xls&quot;); öffnen
    pSheets = pBook-&gt;GetWorksheets();
//    pSheets-&gt;Add();                                    //Blatt hinzufuegen
    pSheet=pBook-&gt;ActiveSheet;
    pSheet-&gt;Name=&quot;test&quot;;                            //Blattname ändern
    //pSheets-&gt;Delete();                            //Blatt löschen

    double q=354.6;
    pXL-&gt;Range[&quot;test!A7&quot;]-&gt;Value2=q;            
    pXL-&gt;Range[&quot;test!A8&quot;]-&gt;Value2=q+3;            

    pXL-&gt;Range[&quot;test!A9&quot;]-&gt;Formula=&quot;=Sum(A7:A8)&quot;;        //bei Formeln englische Namen verwenden sonst Problem            
//    pXL-&gt;Range[&quot;test!D26&quot;]-&gt;Formula=&quot;=Var(D20:D24)&quot;;            
//    pXL-&gt;Range[&quot;test!D27&quot;]-&gt;Formula=&quot;=Average(D20:D24)&quot;;            

    pXL-&gt;Range[&quot;test!B7&quot;]-&gt;Value2=&quot;20.03.2003&quot;;            
    pXL-&gt;Range[&quot;test!B8&quot;]-&gt;Value2=&quot;13:50&quot;;

    pXL-&gt;Range[&quot;test!A7:test!A9&quot;]-&gt;Font-&gt;Bold = true; //Fett schreiben

//    pBook-&gt;Save();    // wenn mit open geöffnet
//saveas funzt bei mir nicht so kann man das umgehen
    pBook-&gt;SaveCopyAs(&quot;c:\\test.xls&quot;);
    pBook-&gt;Close(false);    //damit der die aktuelle nicht speichert

    pXL-&gt;Quit();

    } catch(_com_error &amp;e) {
    dump_com_error(e);

    }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/536168</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/536168</guid><dc:creator><![CDATA[Windalf]]></dc:creator><pubDate>Tue, 08 Jun 2004 16:14:44 GMT</pubDate></item><item><title><![CDATA[Reply to mit vc++ auf ne excel tabelle zugreifen on Mon, 21 Jun 2004 20:45:22 GMT]]></title><description><![CDATA[<pre><code>#import &lt;mso9.dll&gt; no_namespace rename(&quot;DocumentProperties&quot;, &quot;DocumentPropertiesXL&quot;)
</code></pre>
<p>woher bekomm ich eine mso9.dll (microsoft office 9?)<br />
ich hab office 2003. da heißt die vl anders!<br />
kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/545329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/545329</guid><dc:creator><![CDATA[m0rph3uz]]></dc:creator><pubDate>Mon, 21 Jun 2004 20:45:22 GMT</pubDate></item><item><title><![CDATA[Reply to mit vc++ auf ne excel tabelle zugreifen on Mon, 21 Jun 2004 23:02:54 GMT]]></title><description><![CDATA[<p>vermutlich heisst das teil dann mso10.dll</p>
]]></description><link>https://www.c-plusplus.net/forum/post/545407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/545407</guid><dc:creator><![CDATA[Windalf]]></dc:creator><pubDate>Mon, 21 Jun 2004 23:02:54 GMT</pubDate></item><item><title><![CDATA[Reply to mit vc++ auf ne excel tabelle zugreifen on Tue, 22 Jun 2004 04:27:47 GMT]]></title><description><![CDATA[<p>Geht aber auch mit ODBC</p>
]]></description><link>https://www.c-plusplus.net/forum/post/545422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/545422</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Tue, 22 Jun 2004 04:27:47 GMT</pubDate></item><item><title><![CDATA[Reply to mit vc++ auf ne excel tabelle zugreifen on Tue, 22 Jun 2004 10:40:07 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/156">@Unix-Tom</a></p>
<p>hmm das hab ich auch schon mal probiert aber da kann man das teil doch wirklich nur datenbanklike ansprechen oder?</p>
<p>also ich kann ihm nicht sagen setze mal zelle B37 auf 5 usw...</p>
<p>oder geht das damit auch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/545665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/545665</guid><dc:creator><![CDATA[Windalf]]></dc:creator><pubDate>Tue, 22 Jun 2004 10:40:07 GMT</pubDate></item><item><title><![CDATA[Reply to mit vc++ auf ne excel tabelle zugreifen on Wed, 23 Jun 2004 08:12:18 GMT]]></title><description><![CDATA[<p><a href="http://www.codeguru.com/Cpp/data/mfc_database/microsoftexcel/article.php/c4307" rel="nofollow">http://www.codeguru.com/Cpp/data/mfc_database/microsoftexcel/article.php/c4307</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/545778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/545778</guid><dc:creator><![CDATA[olsen]]></dc:creator><pubDate>Wed, 23 Jun 2004 08:12:18 GMT</pubDate></item></channel></rss>