Path: news.mathworks.com!not-for-mail
From: "Cooky Monster" <sharif.uk@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: xlswrite?
Date: Tue, 11 Sep 2007 10:06:34 +0000 (UTC)
Organization: UET Taxila
Lines: 30
Message-ID: <fc5pba$gct$1@fred.mathworks.com>
Reply-To: "Cooky Monster" <sharif.uk@gmail.com>
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 1189505194 16797 172.30.248.37 (11 Sep 2007 10:06:34 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 11 Sep 2007 10:06:34 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1085240
Xref: news.mathworks.com comp.soft-sys.matlab:427813



Dear All

I have a matrix M of three columns and 100 rows. I like to 
export it to Excel. I have to add the lables also. 

I am using 

Titles = {'Number of Cycles', 'Crack Length','Crack Growth 
Rate'}
Labels = {'Cycles', 'a','da/dN'}
Units = {'[Cycles]', '[mm]','[mm/Cycles]'}
[newmatfile, newpath] = uiputfile('*.xls', 'Save As');
filename = [newpath,newmatfile];
if isempty(findstr([newpath,newmatfile],'.xls')) 
   filename = [filename,'.xls'];
end

xlswrite(filename, Titles, 1, 'A2')
xlswrite(filename, Labels, 1, 'A3')
xlswrite(filename, Units, 1, 'A4')
xlswrite(filename, M,1, 'A6')

I like to ask if I can auto width the columns in Excel 
sheet using any matlab command and also to change the font 
size.

Thanks in Advance

Regards