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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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