Hi,
Is there a way to export the SAS output into .xlsx format using ODS option? The below program is not working.
proc sort data=sashelp.class out=test;
by age;
run;
ods excel file="/sasserver/excel_conversion_file.xlsx";
proc print data=test;
run;
ods excel close;
"Not working"?
Please tell us EXACTLY what is not working. Show us the SASLOG. Give us details.
Just a guess, is that a valid file location next to FILE= ???
Yes, it's working when I use .xlsx version. File is getting created, cannot open it. Thanks for looking into it.
It says 'Excel cannot open the file because the file format or file extenstion is not valid'. However this is working fine with .xls format.
Is there a way to get the output file in .xlsx without any error?
proc sort data=sashelp.class out=test;
by age;
run;
ods tagsets.excelxp file="/sas server path/excel_conversion_file.xlsx";
proc print data=test;
run;
ods tagsets.excelxp close;
Location used in the FILE= is correct.
Is the problem happening using ODS EXCEL like in your original post, or using ODS TAGSETS.EXCELXP as in your second example?
What version of Excel do you use?
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.
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.