BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cxkev182
Fluorite | Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions
Miracle
Barite | Level 11

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

4 REPLIES 4
Miracle
Barite | Level 11

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;
cxkev182
Fluorite | Level 6
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,
Miracle
Barite | Level 11

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;

 

cxkev182
Fluorite | Level 6
Excellent thanks again

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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