<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260881</link>
    <title>MATLAB Central Newsreader - Calling Excel macro commands from Matlab</title>
    <description>Feed for thread: Calling Excel macro commands from Matlab</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 15 Sep 2009 16:39:02 -0400</pubDate>
      <title>Calling Excel macro commands from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260881#680283</link>
      <author>Conrad </author>
      <description>Hi, I have the following excel Macro:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Range(&quot;F1:F18&quot;).Select&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;With Selection.Borders(xlEdgeLeft)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.LineStyle = xlContinuous&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.Weight = xlThin&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.ColorIndex = xlAutomatic&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End With&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;With Selection.Borders(xlEdgeRight)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.LineStyle = xlContinuous&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.Weight = xlThin&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.ColorIndex = xlAutomatic&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End With&lt;br&gt;
It basically draws 2 vertical lines in a table.&lt;br&gt;
&lt;br&gt;
I am aware that it's possible to run an excel macro from within Matlab but can I use Matlab commands to draw these vertical lines without having to call a macro?&lt;br&gt;
&lt;br&gt;
Thanks for your help!</description>
    </item>
    <item>
      <pubDate>Tue, 15 Sep 2009 16:51:34 -0400</pubDate>
      <title>Re: Calling Excel macro commands from Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/260881#680287</link>
      <author>Rune Allnor</author>
      <description>On 15 Sep, 18:39, &quot;Conrad &quot; &amp;lt;conr...@gmx.net&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi, I have the following excel Macro:&lt;br&gt;
&amp;gt; &#160; &#160; Range(&quot;F1:F18&quot;).Select&lt;br&gt;
&amp;gt; &#160; &#160; With Selection.Borders(xlEdgeLeft)&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; .LineStyle = xlContinuous&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; .Weight = xlThin&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; .ColorIndex = xlAutomatic&lt;br&gt;
&amp;gt; &#160; &#160; End With&lt;br&gt;
&amp;gt; &#160; &#160; With Selection.Borders(xlEdgeRight)&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; .LineStyle = xlContinuous&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; .Weight = xlThin&lt;br&gt;
&amp;gt; &#160; &#160; &#160; &#160; .ColorIndex = xlAutomatic&lt;br&gt;
&amp;gt; &#160; &#160; End With&lt;br&gt;
&amp;gt; It basically draws 2 vertical lines in a table.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am aware that it's possible to run an excel macro from within Matlab but can I use Matlab commands to draw these vertical lines without having to call a macro?&lt;br&gt;
&lt;br&gt;
Well... don't know if this qualifies as 'matlab commands',&lt;br&gt;
but you can use matlab to issue commands to excel to do what&lt;br&gt;
you want.&lt;br&gt;
&lt;br&gt;
The problem is how to map the commands in the VBA macro over&lt;br&gt;
to something that cam be issued to excel from matlab via the&lt;br&gt;
COM interface.&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
  </channel>
</rss>

