Hello
I wan tto send an email via SAS with following information:
1- In body email add a summary table ( Data set-summary_report)
2-In body email write a few sentences :
Hello,
Please find attached a summary report on sashelp.cars
Kind Regards,
Joe
3-Attach 2 files in one Excel file (It means that attach one excel file with 2 sheets)
Attach1-summary_report
Attach2-sashelp.cars raw data
What is the code the perform this task?
Should I export the 2 files first ?
proc summary data=sashelp.cars;
class origin;
var msrp;
output out=summary_report mean=;
run;
proc export
data=sashelp.cars
dbms=xlsx
outfile="/usr/local/SAS/SASUsers/LabRet/UserDir/udclk79/cars.xlsx"
replace;
sheet='Raw_Data_Cars';
run;
proc export
data=summary_report
dbms=xlsx
outfile="/usr/local/SAS/SASUsers/LabRet/UserDir/udclk79/cars_summary_report.xlsx"
replace;
sheet='Raw_Data_Cars';
run;
Can you please show the code?
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.