Hello,
I am trying to export a sas table to excel but I want the columns labels to be printed instead of the column names. Does anyone know how to do this?
Since there are several ways to create Excel related output you might share the code for what you used so we can suggest a compatible solution.
For example if you use Proc Export then your Proc Export statement should include the option LABEL.
Use the label option
https://support.sas.com/kb/41/735.html
proc export outfile='filename.xlsx' label dbms=xlsx replace; run;
Here is the code I am using:
PROC EXPORT DATA=dataOUTFILE="filepath\model.xlsx"DBMS=Excel REPLACE label;RUN;
but it doesn't print the excel table with the labels
PROC EXPORT DATA=dataOUTFILE="filepath\model.xlsx"DBMS=XLSX REPLACE label;RUN;
or Try
PROC EXPORT DATA=dataOUTFILE="filepath\model.xlsx"DBMS=XLSX REPLACE;
label;RUN;
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!
Submit your idea!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.