The version of Enterprise Guide is not tied to a specific sas-version, so please execute the code i posted.
From your log:
12 ! STYLESHEET=(URL="file:///V:/VOE06529.100/VFS/SFT_PROGRAM_FILES_X64/SAS92/EnterpriseGuide/4.3/Styles/Analysis.css")
This SAS 9.2 and now the bad news: you need Access To PC Files licenced to create xls-files. And with that module you can't create xlsx-files.
Since you are running an ancient version of SAS you cannot use the XLSX engine. You could try PROC EXPORT.
Or you might have to resort to producing an XML or HTML file and telling the use to let Excel convert it to a spreadsheet.
so based on my current code of
FILENAME mail EMAIL TO='me@company.co.uk>'
SUBJECT="D Jumpers" CONTENT_TYPE="text/html";
ODS HTML BODY=mail;
PROC PRINT DATA=work.D_Jumpers;
RUN;
ODS HTML CLOSE;
how do I change that to be an attachment rather than body of the email. Again, avoiding any path files.
Something like this.
%let path=%sysfunc(pathname(work));
ODS HTML file="&path/d_jumpers.html";
PROC PRINT DATA=work.D_Jumpers;
RUN;
ODS HTML CLOSE;
data _null_;
file mail email
TO='me@company.co.uk>'
SUBJECT="D Jumpers"
attach="&path/d_jumpers.html"
;
put 'See attached HTML file for report';
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.