BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
How to send E-mail (excel reports) from SAS?
3 REPLIES 3
deleted_user
Not applicable
Hi,

Pl. use below mentioned syntax.

/* Mailing Code to multiple mail id's and multiple attachement */

filename outbox email 'akash.satyam@gmail.com';

data _null_;
file outbox
to=('akash.satyam@gmail.com' 'akash1.satyam@gmail.com')
cc=('akash2.satyam@gmail.com' 'akash3.satyam@gmail.com')
subject='My SAS output'
attach=("D:\Distribution_A.zip" "D:\Distribution_B.zip")
;
put 'Hi,';
put;
/* put "Please ignore the previous mail as it was not updated and consider the enclosed file for the mentioned subject.";*/
/* put;*/
put "Please find enclosed ------.";
put "---------------------------.";
put ;
put "The file contains the following:";
put "1) A";
put "2) B";
put "3) C";
put "4) D";
put "5) E";
put /;
put "Regards,";
Put 'Akash';
run;
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello SASPhile,

In Enterprise Guide it is a pair of clicks.

Sincerely,
SPR
Cynthia_sas
SAS Super FREQ
...and in addition to the other suggestions, if you are creating reports for Excel using ODS, then a search of the forum postings and Tech Support site will reveal how to email an ODS report. Many different code samples have been posted.

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1620 views
  • 0 likes
  • 4 in conversation