<?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[OLE Automatition mit Excel: Rahmen der Felder verändern GELÖST]]></title><description><![CDATA[<p>Hi</p>
<p>Ich möchte per OLE Excel dazu bewegen bei einer Auswahl von Felder unten eine Linie zu zeichnen. Komplett eine ganzes Feld im Rahmen setzen kann ich. Nur eine einzelne Linie macht mir Probleme. Über den MakroRekorder kam ich auf folgenden Code:</p>
<pre><code>Range(&quot;F13:J13&quot;).Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    With Selection.Borders(xlEdgeBottom)  // Wie heisst dieser Befehl in C++
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
</code></pre>
<p>Versucht habe ich mal diesen Cpp Code:</p>
<pre><code class="language-cpp">oRange = oSheet.GetRange(COleVariant(&quot;A6&quot;), COleVariant(&quot;R6&quot;));
	// jetzt eine Linie ziehen 
	Borders oBorders;
	oBorders = oRange.GetBorders();
	oBorders.SetLineStyle(COleVariant((short) 1));
	oBorders.SetWeight(COleVariant((short) 3));
</code></pre>
<p>Mir fehlt der Befehl bestimmte Linien anzusprechen.</p>
<p>Was mir noch aufgefallen ist. Im Borland Forum werden immer die Konstanten aus dem MakroRekorder verwendet (zB xlInsideVertical) aber in VS sind diese nicht definiert. Ist das richtig?</p>
<p>Gruß Heiko</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/52121/ole-automatition-mit-excel-rahmen-der-felder-verändern-gelöst</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 18:57:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/52121.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Oct 2003 13:14:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OLE Automatition mit Excel: Rahmen der Felder verändern GELÖST on Thu, 16 Oct 2003 20:17:15 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Ich möchte per OLE Excel dazu bewegen bei einer Auswahl von Felder unten eine Linie zu zeichnen. Komplett eine ganzes Feld im Rahmen setzen kann ich. Nur eine einzelne Linie macht mir Probleme. Über den MakroRekorder kam ich auf folgenden Code:</p>
<pre><code>Range(&quot;F13:J13&quot;).Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    With Selection.Borders(xlEdgeBottom)  // Wie heisst dieser Befehl in C++
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
</code></pre>
<p>Versucht habe ich mal diesen Cpp Code:</p>
<pre><code class="language-cpp">oRange = oSheet.GetRange(COleVariant(&quot;A6&quot;), COleVariant(&quot;R6&quot;));
	// jetzt eine Linie ziehen 
	Borders oBorders;
	oBorders = oRange.GetBorders();
	oBorders.SetLineStyle(COleVariant((short) 1));
	oBorders.SetWeight(COleVariant((short) 3));
</code></pre>
<p>Mir fehlt der Befehl bestimmte Linien anzusprechen.</p>
<p>Was mir noch aufgefallen ist. Im Borland Forum werden immer die Konstanten aus dem MakroRekorder verwendet (zB xlInsideVertical) aber in VS sind diese nicht definiert. Ist das richtig?</p>
<p>Gruß Heiko</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373720</guid><dc:creator><![CDATA[HeikoKortlang]]></dc:creator><pubDate>Thu, 16 Oct 2003 20:17:15 GMT</pubDate></item><item><title><![CDATA[Reply to OLE Automatition mit Excel: Rahmen der Felder verändern GELÖST on Thu, 16 Oct 2003 17:50:29 GMT]]></title><description><![CDATA[<p>Offenbar ist Borders eine Collection:</p>
<pre><code class="language-cpp">Border bottomborder;
bottomborder = borders.GetItem((long)9);
bottomborder.SetLineStyle(
      COleVariant((short)-4119));   //xlDouble = -4119
bottomborder.SetWeight(
      COleVariant((short)4));       //xlThick = 4
</code></pre>
<p>Quelle:<br />
<a href="http://support.microsoft.com/support/kb/articles/q179/7/06.asp" rel="nofollow">http://support.microsoft.com/support/kb/articles/q179/7/06.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/373932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373932</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 16 Oct 2003 17:50:29 GMT</pubDate></item><item><title><![CDATA[Reply to OLE Automatition mit Excel: Rahmen der Felder verändern GELÖST on Thu, 16 Oct 2003 20:16:07 GMT]]></title><description><![CDATA[<p>jetzt funktioniert es.<br />
Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/374023</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/374023</guid><dc:creator><![CDATA[HeikoKortlang]]></dc:creator><pubDate>Thu, 16 Oct 2003 20:16:07 GMT</pubDate></item></channel></rss>