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 '[email protected]';

data _null_;
file outbox
to=('[email protected]' '[email protected]')
cc=('[email protected]' '[email protected]')
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
Diamond | Level 26
...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-wordmark-gradient-background 3.pngSAS Innovate

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 3308 views
  • 0 likes
  • 4 in conversation