Import worksheet in excel

Hi all, I have a little problem. I have a file in Excel and import to Matlab:
lab= {'9.4', '9.2_1','9.2_2','9.2_3','9.2_4','9.2_5','8.1','8.2_1','8.2_2'};
K = length(lab);
for c = 1:K
[ndata, text, alldata] = xlsread('test.xls',lab{c});
end
I don't know how I solve the problem when in Excel is not sheet (eg. '8.2_1')
Thank you

 채택된 답변

Matt Tearle
Matt Tearle 2011년 3월 23일

0 개 추천

[~,sheets] = xlsfinfo('test.xls')
Then compare sheets to lab using set operations (eg ismember or intersect)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

질문:

2011년 3월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by