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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.