<?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[Neue Excel Datei]]></title><description><![CDATA[<p>Hi!</p>
<p>Kann ich mit den Ole Funktionen eine neue Excel Datei erstellen? oder muss ich einfach eine Datei mit der Endung .xls erstellen und dann dort die Daten reinschreiben?</p>
<p>Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/191585/neue-excel-datei</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 19:28:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/191585.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Sep 2007 15:21:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Neue Excel Datei on Tue, 04 Sep 2007 15:21:01 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Kann ich mit den Ole Funktionen eine neue Excel Datei erstellen? oder muss ich einfach eine Datei mit der Endung .xls erstellen und dann dort die Daten reinschreiben?</p>
<p>Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1358897</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1358897</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Tue, 04 Sep 2007 15:21:01 GMT</pubDate></item><item><title><![CDATA[Reply to Neue Excel Datei on Tue, 04 Sep 2007 17:42:16 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Das geht sicher. Schau dir im Zweifelsfall immer die VBA-Hilfe an, dort werden die ganzen Befehle erklärt die du auch über OLE nutzt.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1358975</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1358975</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 04 Sep 2007 17:42:16 GMT</pubDate></item><item><title><![CDATA[Reply to Neue Excel Datei on Wed, 05 Sep 2007 07:54:07 GMT]]></title><description><![CDATA[<p>siehe z.B. in der FAQ -&gt; &quot;Daten nach Excel exportieren&quot;, dort wird erst eine neue Excel-Mappe erstellt, dann gefüllt und unter einem beliebigen Namen gespeichert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1359184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1359184</guid><dc:creator><![CDATA[Linnea]]></dc:creator><pubDate>Wed, 05 Sep 2007 07:54:07 GMT</pubDate></item><item><title><![CDATA[Reply to Neue Excel Datei on Fri, 07 Sep 2007 16:17:18 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">try
      {
          Variant WorkBooks = Excel.OlePropertyGet(&quot;WorkBooks&quot;);
          WorkBooks.OleFunction(&quot;Add&quot;);

          Variant ActiveWorkBook = Excel.OlePropertyGet(&quot;ActiveWorkbook&quot;);

          Variant WorkSheets = Excel.OlePropertyGet(&quot;Worksheets&quot;);

          Variant WorkSheet = WorkSheets.OlePropertyGet(&quot;Item&quot;, 1);
          WorkSheet.OleFunction(&quot;Activate&quot;);

          for (int i = 0; i &lt; Liste-&gt;RowCount; i ++)
          {

            Variant Spalte_Nummer = WorkSheet.OlePropertyGet(&quot;Cells&quot;,1+i,1);
            Variant Spalte_Beschreibung = WorkSheet.OlePropertyGet(&quot;Cells&quot;,1+i,2);
            Variant Spalte_Preis = WorkSheet.OlePropertyGet(&quot;Cells&quot;,1+i,3);

            Spalte_Nummer.OlePropertySet(&quot;Value&quot;,Liste-&gt;Cells[1][i]);
            Spalte_Beschreibung.OlePropertySet(&quot;Value&quot;,Liste-&gt;Cells[2][i]);
            Spalte_Preis.OlePropertySet(&quot;Value&quot;,Liste-&gt;Cells[3][i]);
            /*Variant Range1 = WorkSheet.OlePropertyGet(&quot;Cells&quot;, i+1, 1); // 1.Zeile / 1.Spalte
            Range1.OlePropertySet(&quot;Value&quot;, Liste-&gt;Cells[i][1]);

            Variant Range2 = WorkSheet.OlePropertyGet(&quot;Cells&quot;, i+1, 2); // 1.Zeile / 2.Spalte
            Range2.OlePropertySet(&quot;Value&quot;, Liste-&gt;Cells[i][2]);

            Variant Range3 = WorkSheet.OlePropertyGet(&quot;Cells&quot;, i+1, 3); // 1.Zeile / 3.Spalte
            Range3.OlePropertySet(&quot;Value&quot;, Liste-&gt;Cells[i][3]);    */
          }

          ActiveWorkBook.OleFunction(&quot;SaveAs&quot;, datei.c_str());

          Application-&gt;MessageBox(&quot;Fertig&quot;,&quot;Dummy&quot;,MB_ICONINFORMATION);
      }
      catch(...)
      {
        Application-&gt;MessageBox(&quot;Fehler&quot;,&quot;Dummy&quot;,MB_ICONINFORMATION);
      }

      Excel.OleFunction(&quot;Quit&quot;);

      Excel = Unassigned;
</code></pre>
<p>Habe nun das, danke erstmal. Allerdings tritt dauernd ein Fehler auf, und die Catch Anweisung wird ausgeführt. Datei ist ein AnsiString mit Pfad, dateiname und endung</p>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1360927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1360927</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Fri, 07 Sep 2007 16:17:18 GMT</pubDate></item><item><title><![CDATA[Reply to Neue Excel Datei on Fri, 07 Sep 2007 17:36:13 GMT]]></title><description><![CDATA[<p>ok, klappt danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1360972</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1360972</guid><dc:creator><![CDATA[Dragonfire]]></dc:creator><pubDate>Fri, 07 Sep 2007 17:36:13 GMT</pubDate></item></channel></rss>