Reading the sheet name of a .xls file with Matlab -
i have got 30 files named data1.xls data30.xls. in each file, there 2 sheets i'm interested in. first called 'ergebnisse' name of second sheet, important me. sheet changes name. problem here don't know how tell matlab use changing sheet name.
what got far:
liste = dir('*.xls'); % how many files in folder liste=struct2cell(liste); liste=liste(1,:)'; i=1:length(liste) % i=number of files filename=['data' num2str(i) '.xls']; [num,txt,raw]=xlsread(filename,'ergebnisse'); sheet=txt(3,1); [num,txt,raw]=xlsread(filename,sheet); end
the answer sheet 't4_quer_3' write next xlsread
doesn't work. help
you dont need cell txt(3,1), content. either go
sheet=txt{3,1};%notice other brackets
or go
[num,txt,raw]=xlsread(filename,sheet{:}); %{:}content of cell
Comments
Post a Comment