Hi,
I am trying to figure out how to use ODS Excel and two PROC REPORTs to write to the same worksheet. For example,
ods excel file='C:\temp\test.xlsx'
options(sheet_name="dsn" sheet_interval='TABLE' gridlines='ON' flow='DATA');
proc report data=dsn1 nowd
columns VarA VarB VarC;
.
.
Define statements
proc report data=dsn2 nowd
columns VarD VarE Var F;
.
.
Define statements
Note that the first PROC REPORT uses a dataset called dsn1 and the second PROC REPORT uses a dataset called dsn2. Ideally, I would like for the PROC REPORT using dsn2 to start at row 60 on the worksheet.
If you remove SHEET_INTERVAL='TABLE', your code should work, both PROC REPORT outputs should go in the same worksheet, but you can't control which line it starts on.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.