- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Would you please suggest me how to remove the frame line and gridded lines from the tables that is PPT ods generated. Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You forgot to specify your new style with the STYLE= option on your ODS POWERPOINT statement.
ods powerpoint file='/sas/goodresult.pptx' style=mystyle;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much, Cynthia!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You forgot to specify your new style with the STYLE= option on your ODS POWERPOINT statement.
ods powerpoint file='/sas/goodresult.pptx' style=mystyle;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.