The SAS Output Delivery System and reporting techniques

ODS Tagsets.Excelxp proc tabulate format totals to bold

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

ODS Tagsets.Excelxp proc tabulate format totals to bold

[ Edited ]

Hi All,

I am outputting a proc tabulate to excel via ods tagsets.Excelxp.

Is there a way I can make the grand total row and column bold?

Example below:

ods tagsets.ExcelXP file=fileout style=normal;

proc tabulate data=sashelp.shoes;
class product region / missing;
var sales;
table product all='Grand Total',
sales * (region all='Grand Total') * {style={tagattr='format:#,##0.00'}};
run;

ods _all_ close;

Kind Regards,

cxkev


Accepted Solutions
Solution
‎02-23-2017 03:42 AM
Regular Contributor
Posts: 226

Re: ODS Tagsets.Excelxp proc tabulate format totals to bold

Hi, something like this? 

ods tagsets.excelxp path='c:\users\desktop' file='shoes.xml' style=normal; 
proc tabulate data=sashelp.shoes style={tagattr='format:#,##0.00'}; 
	class product region / missing; 
	var sales ; 
	table product all='grand total'*{style=<parent>}, 
	      sales*(region all='grand total'*{style=<parent>});  
	keyword  all / style={font_weight=bold tagattr='format:#,##0.00'};
run; 
ods _all_ close;

View solution in original post


All Replies
Solution
‎02-23-2017 03:42 AM
Regular Contributor
Posts: 226

Re: ODS Tagsets.Excelxp proc tabulate format totals to bold

Hi, something like this? 

ods tagsets.excelxp path='c:\users\desktop' file='shoes.xml' style=normal; 
proc tabulate data=sashelp.shoes style={tagattr='format:#,##0.00'}; 
	class product region / missing; 
	var sales ; 
	table product all='grand total'*{style=<parent>}, 
	      sales*(region all='grand total'*{style=<parent>});  
	keyword  all / style={font_weight=bold tagattr='format:#,##0.00'};
run; 
ods _all_ close;
Contributor
Posts: 25

Re: ODS Tagsets.Excelxp proc tabulate format totals to bold

Thank you very much. That makes the totals bold. Is there a way to right align the figures, as this code left aligns them?

Kind Regards,
Regular Contributor
Posts: 226

Re: ODS Tagsets.Excelxp proc tabulate format totals to bold

Sorry for the late reply. Please see below updated code in regards to your concern. HTH.

 

ods tagsets.excelxp path='c:\users\desktop' file='shoes.xml' style=normal; 
proc tabulate data=sashelp.shoes style=[tagattr='format:#,##0.00']; 
	class product region / missing; 
	var sales;
	table product all='Grand Total'*{style=[font_weight=bold tagattr='format:#,##0.00']}, 
	      sales*(region all='Grand Total'*{style=[font_weight=bold tagattr='format:#,##0.00']}); 
run; 
ods _all_ close;

 

Contributor
Posts: 25

Re: ODS Tagsets.Excelxp proc tabulate format totals to bold

Excellent thanks again
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 316 views
  • 1 like
  • 2 in conversation