We will now look into the various techniques of formatting the ODS files.
Formatting ODS files
Multiple sheets
If we have n number of output files, we don't need to produce n number of destination files. For example, you can use the following code to put three of our datasets into the same Excel file. Each dataset will be written to a different sheet, and the name of the sheet is specified in the code:
ODS Excel File='/folders/myfolders/Datasets.xlsx' Options(Sheet_Name="Class");
Proc Print Data=Class;
Run;
ODS Excel Options(Sheet_Name="Customer_X");
;
Proc Print Data=Customer_X;
Run;
ODS Excel Options(Sheet_Name="Dealership");
;
Proc Print Data=Dealership;
Run;
ODS Excel Close;
The code produces...