mwoua
mwoua

Reputation: 403

xlsread function in matlab systematically loads the whole file and not the specified cells

I used the command

[num,txt,raw] = xlsread(excelPath,1,'C2:C3')

as it was done here (Reading strings into Matlab from excel?) but matlab systematically loaded the whole excel file. I don't need all the table and only want the specific cells C2 and C3. How can I do this ? (A more brutal solution would be to load the whole file and then look for the right place in num, txt or raw but I look for the other solution)

Thanks !

Upvotes: 0

Views: 334

Answers (1)

am304
am304

Reputation: 13876

Have you just tried

num = xlsread(excelPath,1,'C2:C3')

Does this load only the specified cells?

EDIT

if you are using xlsread on a non-Windows O/S, then it uses the basic mode which "does not support an xlRange input when reading XLS files. In this case, use '' in place of xlRange." See the documentation for the xlsread function for more info.

Upvotes: 1

Related Questions