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

Hello!

 

 Would you please suggest me how to remove the frame line and gridded lines from the tables that is PPT ods generated. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Tim_SAS
Barite | Level 11

You forgot to specify your new style with the STYLE= option on your ODS POWERPOINT statement.

 

ods powerpoint file='/sas/goodresult.pptx' style=mystyle;

View solution in original post

8 REPLIES 8
Cynthia_sas
SAS Super FREQ

Hi:

  Using STYLE= overrides worked for me -- this approach would work for PROC PRINT, PROC REPORT and/or PROC TABULATE. Since you did not show any code, it is hard to comment with any more detail.

 

cynthia

 

ppt_no_lines.png

Tim_SAS
Barite | Level 11

The table and cell borders are controlled by the Table and Data style classes. Set the borderwidth to 0 to eliminate the borders.

ods path (prepend) work.templat(update);
proc template;
	define style mystyle;
		parent=styles.powerpointlight;
		class Table, Data /
			borderwidth = 0 
			;
	end;
run;
ods powerpoint file="example.pptx" style=mystyle;
proc print data=sashelp.class(obs=6);
run;
ods powerpoint close;

example.jpg
Tim_SAS
Barite | Level 11

Oh, and you'll have to remove the borders in the Header class as well.

ods path (prepend) work.templat(update);
proc template;
	define style mystyle;
		parent=styles.powerpointlight;
		class Table, Data, Header /
			borderwidth = 0 
			;
	end;
run;
ods powerpoint file="example.pptx" style=mystyle;
proc print data=sashelp.class(obs=6);
run;
ods powerpoint close;
zhangda
Fluorite | Level 6

 Hi Tm,

 

Do you know why I still cannot remove the frame line and gridded lines from my report table after adding the piece of code you just gave me. Please take a look at the sample code below. Thank you so much!

 

ods path (prepend) work.templat(update);
proc template;
define style mystyle;
parent=styles.powerpointlight;
class Table, Data, Header /
borderwidth = 0
;
end;
run;

goptions reset=all cback=white border htitle=4pt htext=7pt device=png vsize=3in ;
options orientation = landscape
papersize = letter
date
number

topmargin = 0.55in
bottommargin =0.1in
leftmargin = 0.8in
rightmargin = 0.1in;
ods noproctitle;
ods escapechar = "^";

footnote1 height=8pt color=darkgrey justify=right " special day ";
/*footnote2 height=8pt color=darkgrey justify=right " " ; */
title1 color= lightgrey justify=right height=8pt " good team " ;

ods powerpoint file='/sas/goodresult.pptx' ;
ods powerpoint layout=titleslide;
proc odstext;
p "&premon. Rate Update" / style=presentationtitle;

run;


ods powerpoint layout=_null_;

 

ods layout gridded columns=2 column_widths=(52% 48%) column_gutter=1pct;

title bold color= darkblue justify=left height=18pt " &premon. Metrics" ;
ods region ;


goptions reset=all cback=white border htitle=4pt htext=7pt device=png vsize=3in ;

 


Proc report data=joinsum2_1_a contents=" " nowd split='\'
style(header)={ just=center color=white background=cornflowerblue fontsize=0.9 font_weight=bold }
style(column)={ background=snow foreground=black fontsize=0.9} ;

column _name_ asof&premon. as&premon. BW ;

define _name_ / " Metric" style={cellwidth=1.8in } ;

define asof&premon./ " &Mar_Yr." style={ just=center cellwidth=0.65in };
define as&premon./ "&Mar_PreYr." style={ just=center cellwidth=0.65in };
define BW/ "#B(W)" style={ just=center foreground=negfmt. foreground=white};

 

 

compute _name_ ;

/* if _name_= 'Volume' then call define(_row_,'style','style={background=gainsboro }');*/
if _name_= 'Score' then call define(_row_,'style','style={background=gainsboro }');
if _name_= 'rate' then call define(_row_,'style','style={background=gainsboro}');
if _name_= 'ratio' then call define(_row_,'style','style={background=gainsboro}');
endcomp;
run;

Tim_SAS
Barite | Level 11

You forgot to specify your new style with the STYLE= option on your ODS POWERPOINT statement.

 

ods powerpoint file='/sas/goodresult.pptx' style=mystyle;
zhangda
Fluorite | Level 6

Hi Tim,

 

Thank you so much for your reminder. Another thing is, what if I dont want to remove the frame line and gridded line from all tables, but some tables, can I homemake it?

 

Thanks a lot!

Tim_SAS
Barite | Level 11

Not using a style template. The style template applies to the the entire .pptx file, so if  the template removes the table/data/header borders then they're removed from all the tables. You can specify different border styles on the tables created by PROC REPORT, PRINT, and TABULATE using STYLE= options, as @Cynthia_sas demonstrated.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 8 replies
  • 26740 views
  • 4 likes
  • 3 in conversation