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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.