Dear all,
I have two SAS tables. The first table contains data for early patient records
and second the data for late stages of patient records.
I want to output the data from both tables in one excel sheet as below:
I tried using 2 proc print statements, the result is written quiet in one excel table but in two different sheets. I want the output one below the other as in this example. Here my SAS code. I will appreciate any help
ods excel file='mypath\myexcelfile.xlsx';
proc print data= data_early;
run;
proc print data= data_late;
run;
ods excel close;
Stage I | Stage II | Stage III | Stage IV | |
early | 34 | 6 | 9 | 134 |
metas (IV) | leg (I-III) | |||
late | 12 | L_III | D_I_II | |
6 | 1 |
Thanks it worked
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.