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

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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