To specify the ODS destination for Excel, the syntax is as follows:
ODS EXCEL FILE="filename.xlsx";
We will use the Class dataset used frequently in this book. The filename specified is the same as the dataset. The following destination relates to the project folder I have created as part of my SAS University Edition session. This needs to be customized as per the SAS version you are using. It might be difficult to produce this output in a client-server location unless you know the destination where you are allowed to save and retrieve files:
ODS Excel File = '/folders/myfolders/Class.xlsx';
Proc Print Data=Class;
Run;
ODS Excel Close;
In the preceding code, we have opened a new ODS destination and closed it at the end of the Proc Print procedure as we don't want the rest of the session output to go to the Excel location. The...