How to get SAS data into excel using different variable names?
A simple example
ods excel file="newfile.xlsx";
proc print data=sashelp.class(rename=(height=tallness weight=heaviness sex=gender));
run;
ods excel close;
Please provide an example of your current variable names and what you expect the result to be.
Depends on the way you used to export the dataset. So please post the code you have, so that we can suggest something working in your setup.
Have a look at docs the rename-statement and/or the rename-option.
A simple example
ods excel file="newfile.xlsx";
proc print data=sashelp.class(rename=(height=tallness weight=heaviness sex=gender));
run;
ods excel close;
EXCEL files do not have variables.
Are you asking how to make an Excel sheet with column headers that are different than the variable names in the source dataset?
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.