<?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[Problem beim Vergleichen mit Excel]]></title><description><![CDATA[<p>Hi zusammen</p>
<p>ich bin schon so weit dass ich mir etwas vom excel hole und auch in ein sttringgrid speichere... ABER... ich habe jetzt im StringGrid meine Srücklisten nummer stehen und im excel steht auch meine Stücklistennummer und die dazugehörige Zeichnungsnummer und die will ich mir nun auch in das stringgrid speichern.</p>
<p>dh die Stücklisten nummer 34 340 21 hat zb die Zeichnungsnummer 58 695 23 die müssen aber nicht in der richtigen spalte stehen.</p>
<p>ich hab das mal mit dem folgenden code probiert!</p>
<pre><code class="language-cpp">Variant vE, vW, vWSs, vWS;
         AnsiString K;

         vE = Variant::CreateObject(&quot;Excel.Application&quot;);

         vW = vE.OlePropertyGet(&quot;WorkBooks&quot;);
         vW.OleFunction(&quot;Open&quot;,&quot;D:\\Nummern.xls&quot;);

         vWSs = vE.OlePropertyGet(&quot;Worksheets&quot;);
         vWS = vWSs.OlePropertyGet(&quot;Item&quot;, 1);

         Integer i=0;
         Integer x=0;
         do
         {
                AnsiString test = AnsiString (vWS.OlePropertyGet(&quot;Cells&quot;, x,2).OlePropertyGet(&quot;Value&quot;));
                if (frmanzeige-&gt;strtabelle-&gt;Cells [2] [i] == test )
                {
                        K = vWS.OlePropertyGet(&quot;Cells&quot;, x,2).OlePropertyGet(&quot;Value&quot;);
                        frmanzeige-&gt;strtabelle -&gt;Cells [3] [i] = K;
                }
                else
                {
                        ShowMessage(vE.OlePropertyGet(&quot;Cells&quot;,1,3).OlePropertyGet(&quot;Value&quot;));
                        x++;
                }

                i++;

         }

         while (i&lt;=140);
</code></pre>
<p>da bekomm ich aber immer einen fehler bei der OlePropertyGet Methode und ich weiß leider nichtmehr weiter ... wäre nett wenn sich hierzu einer melden würde!<br />
THX</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/178887/problem-beim-vergleichen-mit-excel</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 10:50:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/178887.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Apr 2007 09:34:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem beim Vergleichen mit Excel on Mon, 16 Apr 2007 09:34:24 GMT]]></title><description><![CDATA[<p>Hi zusammen</p>
<p>ich bin schon so weit dass ich mir etwas vom excel hole und auch in ein sttringgrid speichere... ABER... ich habe jetzt im StringGrid meine Srücklisten nummer stehen und im excel steht auch meine Stücklistennummer und die dazugehörige Zeichnungsnummer und die will ich mir nun auch in das stringgrid speichern.</p>
<p>dh die Stücklisten nummer 34 340 21 hat zb die Zeichnungsnummer 58 695 23 die müssen aber nicht in der richtigen spalte stehen.</p>
<p>ich hab das mal mit dem folgenden code probiert!</p>
<pre><code class="language-cpp">Variant vE, vW, vWSs, vWS;
         AnsiString K;

         vE = Variant::CreateObject(&quot;Excel.Application&quot;);

         vW = vE.OlePropertyGet(&quot;WorkBooks&quot;);
         vW.OleFunction(&quot;Open&quot;,&quot;D:\\Nummern.xls&quot;);

         vWSs = vE.OlePropertyGet(&quot;Worksheets&quot;);
         vWS = vWSs.OlePropertyGet(&quot;Item&quot;, 1);

         Integer i=0;
         Integer x=0;
         do
         {
                AnsiString test = AnsiString (vWS.OlePropertyGet(&quot;Cells&quot;, x,2).OlePropertyGet(&quot;Value&quot;));
                if (frmanzeige-&gt;strtabelle-&gt;Cells [2] [i] == test )
                {
                        K = vWS.OlePropertyGet(&quot;Cells&quot;, x,2).OlePropertyGet(&quot;Value&quot;);
                        frmanzeige-&gt;strtabelle -&gt;Cells [3] [i] = K;
                }
                else
                {
                        ShowMessage(vE.OlePropertyGet(&quot;Cells&quot;,1,3).OlePropertyGet(&quot;Value&quot;));
                        x++;
                }

                i++;

         }

         while (i&lt;=140);
</code></pre>
<p>da bekomm ich aber immer einen fehler bei der OlePropertyGet Methode und ich weiß leider nichtmehr weiter ... wäre nett wenn sich hierzu einer melden würde!<br />
THX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1266992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1266992</guid><dc:creator><![CDATA[derf]]></dc:creator><pubDate>Mon, 16 Apr 2007 09:34:24 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Vergleichen mit Excel on Mon, 16 Apr 2007 09:54:46 GMT]]></title><description><![CDATA[<p>nutze mal den <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39301.html" rel="nofollow">Debugger</a> um den Grund für den Fehler zu finden, eventuell versuchst du auf Zeilen/Spalten zuzugreifen die es im Excel nicht gibt (max. Zeilen = 655xx, max. Spalten = 255)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1267006</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1267006</guid><dc:creator><![CDATA[Linnea]]></dc:creator><pubDate>Mon, 16 Apr 2007 09:54:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Vergleichen mit Excel on Mon, 16 Apr 2007 10:22:34 GMT]]></title><description><![CDATA[<p>naja den debugger gibt den fehler bei der OleProperty methode aus und ich fange ja bei der spalte immer mit 0 an bzw zelle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1267022</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1267022</guid><dc:creator><![CDATA[derf]]></dc:creator><pubDate>Mon, 16 Apr 2007 10:22:34 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Vergleichen mit Excel on Mon, 16 Apr 2007 10:29:48 GMT]]></title><description><![CDATA[<p>derf schrieb:</p>
<blockquote>
<p>naja den debugger gibt den fehler bei der OleProperty methode aus und ich fange ja bei der spalte immer mit 0 an bzw zelle.</p>
</blockquote>
<p>Du musst hier bei 1 anfangen.<br />
Ansonsten sehen die OLE-Befehle richtig aus und laufen bei mir auch.</p>
<p>EDIT: Der ist richtig: vWS.OlePropertyGet(&quot;Cells&quot;, x,2).OlePropertyGet(&quot;Value&quot;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1267027</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1267027</guid><dc:creator><![CDATA[Fincki]]></dc:creator><pubDate>Mon, 16 Apr 2007 10:29:48 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Vergleichen mit Excel on Mon, 16 Apr 2007 11:01:14 GMT]]></title><description><![CDATA[<p>jop mit 1 funktionierts ... nur schreibt er mir nichts in meinen StringGrid hinein ka warum</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1267044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1267044</guid><dc:creator><![CDATA[derf]]></dc:creator><pubDate>Mon, 16 Apr 2007 11:01:14 GMT</pubDate></item></channel></rss>