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?
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.