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?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.