Well! Unless you really need different tab colors, I would go for a shorter solution:

options nobyline;

proc sort data=sashelp.fish out=fish;
by species;
run;

ods excel file="&xxtraining./reporting/fish.xlsx"
options(embedded_titles ='yes'
sheet_interval='bygroup'
sheet_name='#byval(species)');

title 'SASHELP.FISH where #byval(species)';

proc print data=fish noobs;
by species;
run;

ods excel close;

To find out about ods excel functionalities, feel free to ask more details about my online training program solutions. ods excel is part of a the reporting module of my main course (veronique.bourcier@xxformat.com).