From: enviro on 20 Oct 2009 00:58 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
From: Giacomo Faggiani on 20 Oct 2009 08:03 > matrix = xlsread('test', 'Sheet'); matrix = xlsread('test', Sheet); try without marks Giacomo
From: enviro on 20 Oct 2009 04:32 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.
From: Leslie McBrayer on 20 Oct 2009 09:37 "enviro" <farhadnejadkoorki(a)yahoo.co.uk> wrote in message news:1789462907.86588.1256041993772.JavaMail.root(a)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
From: enviro on 21 Oct 2009 01:39 Thanks for the help
|
Next
|
Last
Pages: 1 2 Prev: Dynamic Model of a Synchronous Generator Next: replace inf values in vector by zero's |