Dear Community,
While sending proc report output to .xml file through ods tagsets.excelxp table bottom borders not drawn. I'm using proc report style options "bordertopcolor=black borderbottomcolor=black..etc.." . Borders are present in result viewer window (html), but missing in .xml file.
Couldn't find a proper documentation related to this question.
Please share your knowledges.
Thank you!
Example code:
ods tagsets.excelxp file= "C:\myfolders\Output\class.xml" options(embedded_titles='on' embedded_footnotes = "on" Merge_Titles_Footnotes = "on" Row_Heights='20,16,0,32,32,0,0' Skip_Space= '0,0,0,0,0' wrap_text='yes')style=listing;
title font='TREBUCHET MS' h=11pt "Reporting Class table";
footnote j=l font='TREBUCHET MS' h=10pt 'Notes: Testing ODS tagsets.excelxp options.';
proc report data= sashelp.class style(report)={background=white borderrightcolor=white borderleftcolor=white bordertopcolor=black borderbottomcolor=black bordertopwidth=1pt borderbottomwidth=1pt}
style(header)={height=24pt font_face='TREBUCHET MS' fontsize=11pt background=white borderrightcolor=white borderleftcolor=white bordertopcolor=black borderbottomcolor=black bordertopwidth=1 borderbottomwidth=1};
where age lt 13;
column sex age weight height;
define sex/group style(column)={font_face='TREBUCHET MS' fontsize=11pt borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white borderrightwidth=.5pt};
define age/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white borderrightwidth=.5pt};
define weight/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white borderrightwidth=.5pt};
define height/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white borderrightwidth=.5pt};
run;
ods tagsets.excelxp close;
Html output:
.xml output:Missing table bottom border
For the Tagsets.ExcelXP destination, you can use a Compute block to add the bottom border.
proc report data= sashelp.class
style(report)={background=white borderrightcolor=white borderleftcolor=white
bordertopcolor=black borderbottomcolor=black bordertopwidth=1pt
borderbottomwidth=1pt}
style(header)={height=24pt font_face='TREBUCHET MS' fontsize=11pt background=white
borderrightcolor=white borderleftcolor=white bordertopcolor=black
borderbottomcolor=black bordertopwidth=1 borderbottomwidth=1};
where age lt 13;
column sex age weight height;
define sex/group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
define age/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
define weight/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
define height/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
compute after / style=[bordertopcolor=black bordertopwidth=1pt ];
line ' ';
endcomp;
run;
For the Tagsets.ExcelXP destination, you can use a Compute block to add the bottom border.
proc report data= sashelp.class
style(report)={background=white borderrightcolor=white borderleftcolor=white
bordertopcolor=black borderbottomcolor=black bordertopwidth=1pt
borderbottomwidth=1pt}
style(header)={height=24pt font_face='TREBUCHET MS' fontsize=11pt background=white
borderrightcolor=white borderleftcolor=white bordertopcolor=black
borderbottomcolor=black bordertopwidth=1 borderbottomwidth=1};
where age lt 13;
column sex age weight height;
define sex/group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
define age/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
define weight/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
define height/ group style(column)={font_face='TREBUCHET MS' fontsize=11pt
borderleftcolor=white borderleftwidth=.5pt borderrightcolor=white
borderrightwidth=.5pt};
compute after / style=[bordertopcolor=black bordertopwidth=1pt ];
line ' ';
endcomp;
run;
Awesome!
Thank you, @Kathryn_SAS once again, for the solution!
I have been trying:
compute after;
line @1 '____________';
endcomp;
which does not set the line length accordingly...
A nice work around.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: