Tuesday, August 30, 2016

XLS export

With ODS EXCELXP or ODS EXCEL, you may get some fancy looking as you can add style or format. However, I prefer the native Excel output without any decoration. Please note that we can write only one dataset at one time.

Below is the sample code:
libname xlsout xlsx '.\out.xls';

data xlsout.a;
    set sashelp.class;
run;

libname xlsout clear;