SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
working_bot
Calcite | Level 5

First time post here. Please let me know how to make it better.

 

I try formatting a bullet list in a text box and a table on ods powerpoint.

 

My desired format (see below screenshots):

  • The whole text box background color should be yellow. The first line "Comment Box" should not have a bullet.
  • The text box and table below should start at the most left of the slide, leaving no margin.
  • The table's Cell Margins should be all 0s. (In PowerPoint it is in Layout - Cell Margins)

Below is my code:

  *HTML output;
  ods html;

  *PPT output;
  options nocenter orientation=landscape topmargin=0in bottommargin=0in 
        leftmargin=0in rightmargin=0in papersize=(13.33in 7.5in);
  ods powerpoint file=".\__temp.pptx" nogtitle nogfootnote;

  *Title and comment box;
  ods layout gridded x=0pct y=0pct;
  ods region;
  proc odstext; p "Title" / style=[color=green TEXTALIGN=L FONTWEIGHT=BOLD FONTSIZE=24pt]; run;
  proc odslist;
/*  cellstyle 1 as {background=lightyellow};*/
  item / style={liststyletype="none" TEXTALIGN=L fontsize=12pt background=yellow};
    p "Comment Box";
    p "Comment Box2";
    list / style={liststyletype="disc" TEXTALIGN=L fontsize=12pt FONTWEIGHT=BOLD background=yellow};
     item "Bullet1";
     item "Bullet2";
    end;
  end;
  run;
  ods layout end;

  *A table;
  ods layout gridded;
  ods region;
  proc print data=sashelp.class  noobs label WIDTH=MINIMUM
  style(header)={cellpadding=0pt /*paddingleft=0pt paddingright=0pt*/ paddingbottom=0pt paddingtop=0pt foreground=black background=grey fontsize=11pt just=c}
  style(column)={cellpadding=0pt paddingleft=0pt paddingright=0pt paddingbottom=0pt paddingtop=0pt fontsize=11pt just=c}
  ;
  run;  
  ods layout end;

  *Close and Output;
  ods powerpoint close;

Below is the original PowerPoint output screenshot.

 

working_bot_0-1717598471930.png

Below is what I would like to have.

working_bot_1-1717598530803.png

 

Thank you in advance!

 

1 REPLY 1
Ksharp
Super User

You could use PROC REPORT to replace PROC ODSLIST.

options nocenter orientation=landscape topmargin=0in bottommargin=0in 
        leftmargin=0in rightmargin=0in papersize=(13.33in 7.5in);
  ods powerpoint file="c:\temp\temp.pptx" nogtitle nogfootnote;
title;

data x;
input x $80.;
cards;
Comment Box
Comment Box2
(*ESC*){style [foreground=yellow].......}●    Bullet1
(*ESC*){style [foreground=yellow].......}●    Bullet2
;

  *Title and comment box;
  ods layout gridded x=0pct y=0pct;
  ods region;
  proc odstext; p "Title" / style=[color=green TEXTALIGN=L FONTWEIGHT=BOLD FONTSIZE=24pt]; run;


proc report data=x nowd noheader 
style(column)={rules=none frame=void background=yellow bordercolor=yellow fontsize=12pt cellpadding=0 cellspacing=0};
run;


  ods layout end;

  *A table;
  ods layout gridded;
  ods region;
  proc print data=sashelp.class(obs=10)  noobs label WIDTH=MINIMUM
  style(header)={cellpadding=0pt /*paddingleft=0pt paddingright=0pt*/ paddingbottom=0pt paddingtop=0pt foreground=black background=grey fontsize=11pt just=c}
  style(column)={cellpadding=0pt paddingleft=0pt paddingright=0pt paddingbottom=0pt paddingtop=0pt fontsize=11pt just=c}
  ;
  run;  
  ods layout end;

  *Close and Output;
  ods powerpoint close;

Ksharp_0-1717643853807.png

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 1 reply
  • 425 views
  • 0 likes
  • 2 in conversation