Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news1.google.com!news.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: xlsread-multiple sheets
Date: Tue, 20 Oct 2009 04:58:52 EDT
Organization: The Math Forum
Lines: 12
Message-ID: <656386755.85551.1256029162219.JavaMail.root@gallium.mathforum.org>
NNTP-Posting-Host: gallium.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1256029162 2363 144.118.94.39 (20 Oct 2009 08:59:22 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Tue, 20 Oct 2009 08:59:22 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:578625


Hi there;

I would like to read multiple excel sheets and save each sheet as separate matrix. I have tried below but there is a problem yet. Any help would be appreciated.
 
%--------------------------
[type,sheetname] = xlsfinfo('test.xls'); 
m=size(sheetname,2); 

for(i=1:1:m); 
Sheet = char(sheetname(1,i)) ;  
matrix = xlsread('test', 'Sheet'); 
end