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!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: