September 2019
Beginner to intermediate
346 pages
7h 35m
English
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 the following file in the specified location:

Read now
Unlock full access