Hello,
I use Enterprise 7.1 and coded the below to generate email output, however want to add column/row lines to the tables (output example at the bottom)
options emailsys=smtp emailhost= localhost emailport=25;
FILENAME OUTPUT EMAIL
SUBJECT = "EMAIL SUBJECT"
attach=("/Path/File_Name.xlsx" content_type="application/xlsx")
FROM = "Me@stuff.co.za"
TO=('Person1@stuff.co.za' 'Person2@stuff.co.za')
type='text/html'
CT ='text/html';
ods html3 body=OUTPUT
style=htmlblue;
ods escapechar='^';
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Good Day,";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Summarised view below.";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black}Kind Regards,";
ODS TEXT="^S={font_face='Calibri' font_size=3 fontweight=Medium foreground=black} ";
proc print data=Source_Table noobs;
VAR Loan_Purpose Pricing Loan_Amount n;
format loan_amount comma20.;
TITLE "TABLE TITLE";
Footnote1 "Lottery is based on Male population";
Footnote2 "Average shoe price just over R1k";
run;
ods html3 close;
BTW! I erased the Excel attached due to confidentiality 😄
Hi!
For me it worked by adding a style (table) with frame=box and width:
proc print data=sashelp.class noobs
style (table) = [frame=box borderwidth=1 ];
;
VAR sex name age;
TITLE "TABLE TITLE";
Footnote1 "Lottery is based on Male population";
Footnote2 "Average shoe price just over R1k";
run;
More info in this:
http://support.sas.com/resources/papers/proceedings13/366-2013.pdf
//Fredrik
Try removing the NOOBS option on the Proc Print statement. That option specifically excludes observation numbers.
Thank you Ballardw :D,
I understand that, however I want to add physical lines (like excel formatting) to the tables to read the data easier.
M
Are you asking how to use the FOOTNOTE statement?
LOL Tom 😜
I want to add physical lines to my email tables. Like in excel, separating columns and rows to read the data easier.
M
@Mar1ene wrote:
Thank you Ballardw :D,
I understand that, however I want to add physical lines (like excel formatting) to the tables to read the data easier.
M
????
Appearance in SAS is done with style elements. Each variable in proc print can have an specific style elements set, font size, weight color, back ground color as a start.
But I have no idea what you mean by "like excel formatting" when used with "add physical lines".
If you want additional text that does not appear from proc print then perhaps Proc ODSTEXT (not the same as the ODS text you show).
Maybe you can use some of these 🙂
The perfect grid?!
http://www2.sas.com/proceedings/forum2008/258-2008.pdf
Seemes that mail clients might change the HTML...:
https://communities.sas.com/t5/ODS-and-Base-Reporting/Missing-gridlines/td-p/262943
//Fredrik
This is what I want to do... add lines to the table in the email... ...:D just prettier... this is a paintbrush job...
Hi!
For me it worked by adding a style (table) with frame=box and width:
proc print data=sashelp.class noobs
style (table) = [frame=box borderwidth=1 ];
;
VAR sex name age;
TITLE "TABLE TITLE";
Footnote1 "Lottery is based on Male population";
Footnote2 "Average shoe price just over R1k";
run;
More info in this:
http://support.sas.com/resources/papers/proceedings13/366-2013.pdf
//Fredrik
So you wanted to add borders around the cells in the table.
It sounded like you wanted to add lines of text.
Hi Tom,
I have to agree, I could have worded my question better... I guess it comes with not being English 😜 ... Thank you for wanting to assist anyway!!
M
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!
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.