In addition reading Excel data,
SAS can also create Excel worksheets from SAS data sets.
To do this, you use
the
SAS/ACCESS LIBNAME statement. For example, to create a new worksheet
named high_stress from the temporary SAS data set work.high_stress
and save this worksheet in the new Excel file newExcel.xlsx, you
would submit the following LIBNAME statement and DATA step:
libname clinic xlsx 'c:Usersmylaptop
ewExcel.xlsx';
data clinic.high_stress;
set high_stress;
run;