BookmarkSubscribeRSS Feed
Rohit2RaiAxis
Fluorite | Level 6

This is the code I wrote

proc export data=work.XYZ
  outfile="XYZ.xlsx"
  dbms=xlsx replace;
run;

filename outbox email
  from='abc@abc.com'
  to='abc@abc.com' 
  type='text/html'
  subject='Test Mail'
  attach=("XYZ.xlsx" content_type="excel");
  
ods html body=outbox rs=none style=Htmlblue;

proc odstext;
  p 'Hello,';
  p ' Please find the attachment';
  p 'Thank You';
  title;
run;
ods html close;

I get error at this line

attach=("XYZ.xlsx" content_type="excel");
                                      _
                                     24

ERROR 24-2: Invalid value for the attach option.

Please let me know what am I missing, or if this is a bug which has a workaround.

Thanks

3 REPLIES 3

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 544 views
  • 0 likes
  • 3 in conversation