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
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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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