BookmarkSubscribeRSS Feed
Calcite | Level 5

Hi Every one,

i have  a folder with 5 excel files i want to write code automate email with all that attachments please help.





Super User

When you wrote your question, you had this right below:

Stop right there! Before pressing POST, tick off this checklist. Does your post …

✔ Have a descriptive subject line, i.e., How do I ‘XYZ’? ✔ Use simple language and provide context? Definitely mention what version you’re on. ✔ Include code and example data? Consider using the SAS Syntax feature.






Note "provide context".

- how are you using SAS (single machine, client/server, On Demand, SAS Studio, Enterprise Guide, Batch)?

- do you have certain capabilities like XCMD which allows you to use the X statement?

- if you have XCMD, which operating system is your SAS process running on?

- where are the Excel files located (on the same machine as SAS, or on another, so that a network connection is needed)?

Opal | Level 21


Writing a subject line all in upper case is considered screaming as far as I know. Is this what you intended to do? Scream at us?


There are quite a few code examples in white papers and also in the SAS documentation. Using Google with the following search term will bring up helpful links:  site:* 9.4 email attachment


I suggest you try one of the examples and shouldn't you be able to make things work for you then come back with your code and SAS log and tell us what you've tried, what's currently not working and what you have and need.


Also: Try to split your big problem into smaller problems

1. Can you send an email at all?

2. Can you send an email with a single attachment?

3. Can you send an email with multiple attachments?


By splitting up the big problem into chunks you'll help yourself and us as it will allow you to ask targeted questions for the parts you can't make work and we then can concentrate on the bits which you can't resolve instead of discussing "everything" where most of it won't be relevant to your actual challenge.

Diamond | Level 26 RW9
Diamond | Level 26

Just to note, email generally has limits - I can't receive anything bigger than 10mb for instance.  Email isn't the best method for distributing reports, look at secure portals, web publishing, network drives and such like.


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 4 in conversation