<?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[Excel-Arbeitsmappe auslesen]]></title><description><![CDATA[<p>ich hab jetzt schon stundenlang nach einer ausführlichen Beschreibung, wie man über COM auf Excel-workbooks zugreift, gesucht.<br />
Ich will Daten+Formatierung aus den Excel-Sheets auslesen.<br />
Alles was ich gefunden habe war entweder mit der MFC oder VCL realisiert. Ich besitze aber weder VC++ noch den C++ Builder.<br />
Im MSDN habe ich nichts gefunden was ohne VC++ funktioniert.<br />
Meine Frage: Kennt jemand ein ausführliches Tutorial zu dem Thema ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/69489/excel-arbeitsmappe-auslesen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 22:05:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/69489.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 Mar 2004 13:44:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Excel-Arbeitsmappe auslesen on Sun, 28 Mar 2004 13:44:07 GMT]]></title><description><![CDATA[<p>ich hab jetzt schon stundenlang nach einer ausführlichen Beschreibung, wie man über COM auf Excel-workbooks zugreift, gesucht.<br />
Ich will Daten+Formatierung aus den Excel-Sheets auslesen.<br />
Alles was ich gefunden habe war entweder mit der MFC oder VCL realisiert. Ich besitze aber weder VC++ noch den C++ Builder.<br />
Im MSDN habe ich nichts gefunden was ohne VC++ funktioniert.<br />
Meine Frage: Kennt jemand ein ausführliches Tutorial zu dem Thema ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/490453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/490453</guid><dc:creator><![CDATA[z4Rilla]]></dc:creator><pubDate>Sun, 28 Mar 2004 13:44:07 GMT</pubDate></item><item><title><![CDATA[Reply to Excel-Arbeitsmappe auslesen on Sun, 28 Mar 2004 17:27:39 GMT]]></title><description><![CDATA[<p>hi, so in etwa solltest du das hinbekommen</p>
<pre><code class="language-cpp">//oder wo auch immer in welchen verzeichnissen die exceldateien zu finden sind... die sind jetzt für office2000 wenn du ne aktuellere version hast oder ne ältere ist es dann ne z.b. ne 8 oder ne 10 statt der 9
#import &lt;mso9.dll&gt; no_namespace rename(&quot;DocumentProperties&quot;, &quot;DocumentPropertiesXL&quot;)   
//#import &quot;C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\vbe6ext.olb&quot; no_namespace   
#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

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;

	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_FALSE; //oder halt true wenn mans sehen will
		WorkbooksPtr pBooks;
		_WorkbookPtr pBook;	
		WorksheetsPtr pSheets;
		_WorksheetPtr pSheet;

                pBooks = pXL-&gt;get_Workbooks();
                pBook = pBooks-&gt;Open(&quot;c:\\tralala.xls&quot;);

                double wert=pXL-&gt;Range[&quot;Blatt1!A5]-&gt;Value;
                printf(&quot;Gelesener Wert aus zelle A5\n&quot;,wert);

	} catch(_com_error &amp;e){dump_com_error(e);}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/490590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/490590</guid><dc:creator><![CDATA[Windalf]]></dc:creator><pubDate>Sun, 28 Mar 2004 17:27:39 GMT</pubDate></item></channel></rss>