Good afternoon,
I need to export from SAS to Excel.
I tried with the proc export but it changed the format and it did not show the column names.
proc export
data=WORK.xxx
dbms=xls
outfile="xxx.xls"
replace;
run;
How can I export?
Thanks!
since you are in the EGuide GUI, you can just export using file --> export.
Insert "label" into the code before replace, this will export the labelled column names from SAS into excel. Mind you if you put labels onto the columns in SAS ie rather than UID you have the label "Unique ID variable", "Unique ID variable" is what will appear in Excel.
proc export
data=WORK.xxx
dbms=xls
outfile="xxx.xls"
label
replace;
run;
If you have variable labels and wanted the SAS variable name to actually be output you could put this before your proc export statement
proc datasets lib=work memtype=data;
modify xxx;
attrib _all_ label=' ';
run;
Hope this helps.
export it as in cvs format and then to excel
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.