BookmarkSubscribeRSS Feed
afettig
Calcite | Level 5

I'm trying to fit a table onto one PP slide.  The problem is I can't figure out how to adjust row/cell height/spacing/margin.  I've tried using 'height', 'cellpadding', 'cellspacing'.  I've tried making each of those very small and very large, in "in" and "pt" but it never changes my output.  I must be using them incorrectly.  Not even sure if that is what I should be using to achieve my goal.  Tried searching for this problem and how to use those style options with not much luck. 

 

I made a test table with sashelp.cars that has the same number of rows as my actual data to hopefully make this easier to help me.  I've attached what I get vs what I want.  Slides 1-2 are the current output.  Slide 3 is what I want.

 

 

proc sql outobs = 41;
create table car_test as
select make, model
from sashelp.cars
;quit;
run;

 

ods _all_ close;
run;

options orientation= landscape papersize=letter nodate nonumber topmargin= .025in bottommargin= .001in
        leftmargin= .5in rightmargin= .5in ;
ods noproctitle ;
ods escapechar ="^" ;
title ;
footnote ;

 

ods powerpoint file ="/mypath/test.pptx";

 

***Create first slide;
proc odstext;
p "Test title" / style=[FONT_WEIGHT=BOLD FONT_SIZE=13 just=l];
run;

 

ods layout gridded x=0.25in y=1.125in;
ods region;

option center;

 

proc report nowd data = car_test
style(header)=[font_weight=bold background=CXD3ADD9 foreground=black just=c fontsize=7pt]
style(column)=[just=c fontsize=7pt verticalalign=middle height=9pt];
col make model;
run;

 

ods layout end;
ods powerpoint close;
ods listing;
run;

 

 

4 REPLIES 4
ghosh
Barite | Level 11

try:

 

ods powerpoint file='test.pptx' layout=TitleAndContent;

 

ref: http://support.sas.com/kb/50/486.html

SuzanneDorinski
Lapis Lazuli | Level 10

https://communities.sas.com/t5/ODS-and-Base-Reporting/Changing-ODS-Powerpoint-Slide-Title-Size/td-p/... shows how to change the size of the title for PowerPoint.

 

You can use PROC PRINT to print the first 20 rows, then another PROC PRINT to print the remaining 21 rows.  

 

proc sql outobs=41;
	create table car_test as select make, model from sashelp.cars;
quit;

run;
ods _all_ close;
run;

* use style template to change size of title font.  see 
* https://communities.sas.com/t5/ODS-and-Base-Reporting/Changing-ODS-Powerpoint-Slide-Title-Size/td-p/239776
* for more details.  ;

ods path (prepend) work.templat(update);
proc template;
  define style styles.mystyle;
    parent = styles.powerpointlight;
    class systemtitle / 
      fontsize=13pt
      fontweight=bold
      textalign=left;
  end;
run;

options orientation=landscape /*papersize=letter*/ nodate nonumber topmargin=.025in 
	bottommargin=.001in leftmargin=.5in rightmargin=.5in;
	
ods noproctitle;

ods escapechar="^";

title;

footnote;

ods powerpoint file="/folders/myfolders/ODS POWERPOINT examples/test.pptx"
  style=mystyle;
  
***Create first slide;

ods powerpoint layout=twocontent;

title "Test title";

proc print data=car_test(obs=20) noobs
  style(header)=[fontweight=bold backgroundcolor=cxd3add9 color=black just=c fontsize=13pt];
  var make model / style(column)=[just=c fontsize=13pt verticalalign=middle height=9pt];
run;

proc print data=car_test(firstobs=21 obs=41) noobs
  style(header)=[fontweight=bold backgroundcolor=cxd3add9 color=black just=c fontsize=13pt];
  var make model / style(column)=[just=c fontsize=13pt verticalalign=middle height=9pt];
run;


ods powerpoint close;
ods listing;
run;

Split 41 row table into 2 pieces to display in PowerPointSplit 41 row table into 2 pieces to display in PowerPoint

Cynthia_sas
SAS Super FREQ

Hi:

  I think Suzanne has a good idea with the 2 column approach. I heard from my contact in Tech Support that you can't get the cellpadding any smaller than 5pt with PowerPoint as a destination, so shrinking cellpadding as a method to fit more on the slide won't work.

 

  Cynthia

afettig
Calcite | Level 5

My actual table I'm reporting out has more than 2 columns of data so unfortunately this is not a feasible option.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1665 views
  • 0 likes
  • 4 in conversation