Path: news.mathworks.com!not-for-mail
From: "Leslie McBrayer" <lmcbrayer@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: xlsread-multiple sheets
Date: Tue, 20 Oct 2009 09:37:17 -0400
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <hbkeee$hqu$1@fred.mathworks.com>
References: <hbk8tq$li0$1@fred.mathworks.com> <1789462907.86588.1256041993772.JavaMail.root@gallium.mathforum.org>
Reply-To: "Leslie McBrayer" <lmcbrayer@mathworks.com>
NNTP-Posting-Host: mcbrayerl.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1256045838 18270 172.31.45.140 (20 Oct 2009 13:37:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 20 Oct 2009 13:37:18 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:578694



"enviro" <farhadnejadkoorki@yahoo.co.uk> wrote in message 
news:1789462907.86588.1256041993772.JavaMail.root@gallium.mathforum.org...
> Thanks for your reply.
> It now gives only final sheet. I wonder if I could have all sheets and a 
> way to save them into individual matrices.

You could create a cell array as follows:

alldata = cell(1, m);

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