From: Steph T on
Hi there,

I have a huge spreadsheet with 280 sheets, and each sheet has about 200x50 data points. Is there a way I can import this data into Matlab, whilst keeping each sheet as a separate variable?

Many thanks,
Steph
From: Fangjun Jiang on
function xlsread can do just like that.

help xlsread

"Steph T" <stephanie.turnbull(a)strath.ac.uk> wrote in message <huto2t$pmi$1(a)fred.mathworks.com>...
> Hi there,
>
> I have a huge spreadsheet with 280 sheets, and each sheet has about 200x50 data points. Is there a way I can import this data into Matlab, whilst keeping each sheet as a separate variable?
>
> Many thanks,
> Steph
From: Steph T on
But is there a way of using xlsread more efficiently, rather than having to use it 280 times?

PS - sorry but I am rather new to Matlab, so humour me :)
From: sscnekro on
> But is there a way of using xlsread more efficiently, rather than having to use it 280 times?

That's a bit up to you. In what way are your data stored in the .xls file? E.g. if all the sheets are arranged the same way (so that ML can start reading data from the same range or cell), it simplifies a lot. Have you got ready 280 variable names, or do you still need to create them? What sort of variable do you prefer to create, matrix, cell array, structure...? Help doc: xlsread(), for loop, structures, field names, ... + browsing the web for some keywords will get to useful hints on other and these sites.
From: Steph T on
"sscnekro " <stiahni.mail(a)zoznam.sk> wrote in message <hv7pe0$9jm$1(a)fred.mathworks.com>...
> > But is there a way of using xlsread more efficiently, rather than having to use it 280 times?
>
> That's a bit up to you. In what way are your data stored in the .xls file? E.g. if all the sheets are arranged the same way (so that ML can start reading data from the same range or cell), it simplifies a lot. Have you got ready 280 variable names, or do you still need to create them? What sort of variable do you prefer to create, matrix, cell array, structure...? Help doc: xlsread(), for loop, structures, field names, ... + browsing the web for some keywords will get to useful hints on other and these sites.

I have 280 identical sheets where I'd be extracting the whole sheet, each called p# where # is a sequential sheet number. Ideally I'd want to read, for example, sheet p1 into variable p1, sheet p2 into variable p3, etc.
I don't have the variables created yet, and ideally I'd like each variable as separate matrices.