Another is to use a different procedure than Export.
Dummy code:
ods excel file="path/yourfilename.xlsx"; proc print data=yourdatasetname noobs label; var firstvarname secondvarname thirdvarname; run; ods excel close;
One advantage of Proc Print is that you can use variable lists. If you have variables with names like measure1, measure2, ..., measure50 you could use Measure1-Measure50 on the var statement if you want them in numeric order. Or if some of variables are already together in order in the data set but you want to place them before or after other variables you use a list with two dashes : thisvar -- thatvar. This list uses those variables in the order they appear in the dataset. Of if you want all variables whose names start with XYZ together but may not specifically care about order within the group use XYZ: the colon tells SAS to use all variable whose names start with XYZ. The order is usually alphabetic. SQL will not allow use of any of the lists constructs. So if you have many variables this may be quite a bit easier on the typing.
Additionally you can provide changes to variable label just for the print statement or style overrides such as cell colors based on values.
or use PROC TABULATE or PROC REPORT with ODS EXCEL, which would have many of the same benefits as described by @ballardw
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!