Path: news.mathworks.com!not-for-mail
From: "Cynthia " <remove.this.cynthia.bell@asu.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using the Microsoft Office Spreadsheet object
Date: Tue, 6 Oct 2009 23:57:02 +0000 (UTC)
Organization: Arizona State University
Lines: 31
Message-ID: <haglge$5m$1@fred.mathworks.com>
References: <hagf27$fhi$1@fred.mathworks.com>
Reply-To: "Cynthia " <remove.this.cynthia.bell@asu.edu>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254873422 182 172.30.248.37 (6 Oct 2009 23:57:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 6 Oct 2009 23:57:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1863712
Xref: news.mathworks.com comp.soft-sys.matlab:575480


Conrad,

There's an example of how to draw borders around cells in this post:  
http://www.mathworks.com/matlabcentral/fileexchange/6889 

Cindy



"Conrad " <conrad7@gmx.net> wrote in message <hagf27$fhi$1@fred.mathworks.com>...
> Hi,
> 
> I'm trying to format an MS-Excel table from within Malab and I'm a bit stuck at the moment. I've managed to create the table using 'OWC11.Spreadsheet.11' and I have populated it. I don't know how to format the table from within Matlab as one would from an excel macro using the following commands:
> 
>   Range("A1:V26").Select
>   Selection.AutoFormat Format:=xlRangeAutoFormatList1, Number:=True, Font:= _
>         True, Alignment:=True, Border:=True, Pattern:=True, Width:=True
> 
> I also want to draw some lines between different columns as shown in the following excel macro example:
> 
>    Range("B1:B26").Select
>    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
>     Selection.Borders(xlDiagonalUp).LineStyle = xlNone
>     Selection.Borders(xlEdgeLeft).LineStyle = xlNone
>         With Selection.Borders(xlEdgeRight)
>         .LineStyle = xlContinuous
>         .Weight = xlThin
>         .ColorIndex = xlAutomatic
>     End With
> 
> Any help on this would be appreciated.Thanks