Here are 3 tables from sashelp.cars dataset. I would like to combine them into one excel report.
proc report data=sashelp.cars(obs=3) out=Porsche;
title "Porsche";
where make = 'Porsche';
column Make Model Type Origin DriveTrain MSRP;
proc report data=sashelp.cars(obs=3) out=BMW;
title "BMW";
where make = 'BMW';
column Make Model Type Origin DriveTrain MSRP;
proc report data=sashelp.cars(obs=3) out=Audi;
title "Audi";
where make = 'Audi';
column Make Model Type Origin DriveTrain MSRP;
run;
However, I don't understand why the titles are all named as the last table 'Audi' when combined like this ?
ods excel file="Stacked.xlsx"
options(sheet_interval='none' embedded_titles='yes');
proc report data=Porsche;
proc report data=BMW;
proc report data=Audi;
run;
ods excel close;
What I want is this, each table retaining it's proper title:
Thanks for clarifying!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.