Hi,
i'm using some code - see below - to send myself an e-mail, where the body contains:
- first paragraph
- output from a table
- last paragraph
The first and last paragraph are left-aligned, which is good.
But the output from the table is center-aligned, which I want to change to also left-aligned.
I can't make that work.
What I tried to do in my code below is put '<p align="left"> _infile_ </p>'; - but that didn't give me the wanted result.
Does anyone has a solution for this?
%macro email_output; %if &totobs. > 0 %then %do; filename REPORT "%sysfunc(pathname(work))\test.html"; filename SEND email to = "x.y@z.z.z" subject = "WEBSERV: error!" from = "x.y@z.z.z" content_type = "text/html"; ods html file=REPORT; proc print data=WORK.QUERY_CHECK_DOUBLES; run; ods html close; data _null_; infile REPORT; file SEND; input; if _infile_ = '<html>' then do; put '<p>First Paragraph </p>'; end; if _infile_ ne '</html>' then put _infile_ ; /* put '<p align="left"> _infile_ </p>';*/ else do; put '<p>Last Paragraph</p></html>'; end; run; %end; %mend;
Have you tried
options nocenter;
?
Thank you, that did the job.
Always nice when there exists simple solutions.
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!
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.