Here is the code:
—————————
Year=[1993 2003 2011 2015]for an=1:4Inputfile= xlsread(Inputfile,num2str(Year(an)));x=Inputfile(:,1);y=Inputfile(:,2);T=table(x,y);filename2=strcat(num3,RIVNOM,'poly','.xls'); sheet=num2str(Year(an));writetable(T,filename2,'sheet',sheet);end
———————————–
It results in an excel file which has three extra sheets at the beginning (sheet1, sheet2, sheet3) and then (1993,2003,2011,2015).
Here is the question: how to avoid generating extra and empty sheets.
Thank you.
Best Answer