Hello,
I've migrated a job from SAS9.1.3 to SAS 9.3, and without any code changes the output has changed.
This job creates a html report and sends it by email, but in SAS 9.3 the report has a box/frame around it as you can see in the pic CTQ - SAS 9.3
But I need to get the output equal to the "old" version:CTQ - SAS 9.1
Any help is welcome, thank you.
Code:
ods listing close;
/*set ods and mail settings options*/
ods path sasuser templat(update) sashelp.tmplmst(read);
Options emailsys="!SASROOT/utilities/bin/sasm.elm.mime" ;
filename ctqmail email to="&umail"
type="text/html"
subject="[CONTROLO DE QUALIDADE] Processamento de &odate para &LNAPP";
/*output result of the proc tabulate to the mail filename*/
ods MSOffice2K body=ctqmail style=meadow;
proc tabulate data=TEMPORARIA2 FORMAT=COMMAX20.0;
class GRUPO CONTROLO VALIDACAO CDTIPOVALIDACAO DATA_ANALISE DATA_ANT GRP_DATA CDGRPENT / style=[color=#0033AA];
classlev GRUPO CONTROLO VALIDACAO CDTIPOVALIDACAO DATA_ANALISE DATA_ANT GRP_DATA CDGRPENT / style=[color=#0033AA];
VAR VALMETRICA VALMETRIC_ANT DIF_MES / style=[color=#0033AA];
table (GRUPO *
(CONTROLO * VALIDACAO * CDTIPOVALIDACAO * CDGRPENT all='Sub-Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]})
all='Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]}),
GRP_DATA='Data(s) Analisada(s)' * (DATA_ANT=''*(VALMETRIC_ANT*SUM='') DATA_ANALISE=''*(VALMETRICA*Sum='') DIF_MES*SUM=''*{S=[preimage=watchit. font_weight=bold font_style=italic]});
%setTitle(odate=&odate);
FOOTNOTE3 height=10pt "Entidade(s) executada(s): &concatident_new";
run;
ods MSOffice2K close;
ods listing;
filename ctqmail;
That's very much a tech support question, because they'll have the different versions to test things easily.
HI:
Are you complaining about the way the output looks in an IE browser when opened or when opened in Excel? Aside from any issues of emailing HTML and/or using the FILENAME statement, it is quite easy to either have the frame or not, depending on what you want to see. Clearly, you know how to use the STYLE= statement level override with PROC TABULATE, so a simple FRAME=VOID should get rid of the FRAME around the output for you. When I run the code test below, the FRAME is removed in all destinations. I suppose you could change the style template for the MEADOW style, but it is hardly worth it since the code fix is so easy.
I don't know whether MEADOW changed between 9.1.3 and 9.3 in terms of border style. I do know that the display of borders was always somewhat wonky with Excel, so in addition to issues with MEADOW and the possibility of changes in the style template (an issue for Tech Support), there is the possibility of issues with how Excel rendered/renders the HTML. In my test of similar code below in 9.3 with either IE or Excel, I got borders in both viewers with FRAME=BOX and did not get borders with FRAME=VOID.
cynthia
ods listing close;
ods MSOffice2K(1) body='c:\temp\testfrm_box.xls' style=meadow;
ods MSOffice2K(2) body='c:\temp\testfrm_box.html' style=meadow;
title 'FRAME=BOX';
proc tabulate data=sashelp.class FORMAT=COMMAX20.0;
where age le 13;
class age sex / style=[color=#0033AA];
classlev age sex / style=[color=#0033AA];
VAR height weight / style=[color=#0033AA];
table (age * sex all='Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]}),
((height*SUM='') (weight*Sum='') )
/s={frame=box} ;
FOOTNOTE3 height=10pt "Entidade(s) executada(s): xxxyyyzzz";
run;
ods _all_ close;
ods MSOffice2K(3) body='c:\temp\testfrm_framevoid.xls' style=meadow;
ods MSOffice2K(4) body='c:\temp\testfrm_framevoid.html' style=meadow;
title 'FRAME=VOID';
proc tabulate data=sashelp.class FORMAT=COMMAX20.0;
where age le 13;
class age sex / style=[color=#0033AA];
classlev age sex / style=[color=#0033AA];
VAR height weight / style=[color=#0033AA];
table (age * sex all='Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]}),
((height*SUM='') (weight*Sum='') )
/style={frame=void};
FOOTNOTE3 height=10pt "Entidade(s) executada(s): aaabbbccc";
run;
ods _all_ close;
Hello,
Thank you for your help.
I forgot some details, the frame I'm trying to remove is the black outer frame that you can see in pic CTQ - SAS 9.3 and not the frame of the table itself.
This behavior occurs in Microsoft Outlook, the report is sent by email and not used in Excel.
Thank you,
Carlos
Hi:
I would recommend working this with Tech Support. It doesn't surprise me that the the HTML (generated to conform to the Microsoft specification) might be rendered one way in IE and Excel and a different way in the Outlook client.
cynthia
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.