SAS Programming

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

I’m trying to create a simple PowePoint file from SAS. The result is rather messy.

Specifically, one aspect: The correlation results are spread to three - four  slides, depends what else I include. Here is the code:

 

ods powerpoint file="/my-pathway/output/obesity_exercise.pptx";

title "Correlation between exercise habits and the prevalence of obesity";

/* correlation: */

proc corr data=gal.all_exercise;

              var aerobic_high muscles no_exercise obesity;

run;

ods powerpoint close;

 

See the result:

2020-01-16 (1).png

 

I want it on one slide, or, second best, two: one with the statistics and one with the table. Any hint?  

4 REPLIES 4
Reeza
Super User

1. Use ODS SELECT/EXCLUDE to ensure you only keep what you want to see

2. Change the style to a simpler style that will fit on the page

3. If you have too much data, you have too much data. 

4. Instead of a table, show a correlation heatmap which is graphical and easier to interpret and you can get away with smaller numbers.

 


@GAL wrote:

I’m trying to create a simple PowePoint file from SAS. The result is rather messy.

Specifically, one aspect: The correlation results are spread to three - four  slides, depends what else I include. Here is the code:

 

ods powerpoint file="/my-pathway/output/obesity_exercise.pptx";

title "Correlation between exercise habits and the prevalence of obesity";

/* correlation: */

proc corr data=gal.all_exercise;

              var aerobic_high muscles no_exercise obesity;

run;

ods powerpoint close;

 

See the result:

2020-01-16 (1).png

 

I want it on one slide, or, second best, two: one with the statistics and one with the table. Any hint?  


 

deanalepa
Calcite | Level 5

I suggest you use the alternative template if you want to create and compile the presentation in 2 files, or you may need to look for a good alternative.

deanalepa
Calcite | Level 5
It would help if you tried recording these slides and compiling them in the video editor application. Keep in mind that you cannot use the default PowerPoint templates. Try looking for templates on the internet, for example, and you can try looking at https://okslides.com . You can find various slide templates on the site, and I usually look at this site if I need any good templates for my PowerPoint presentations.
PaigeMiller
Diamond | Level 26

Your ability to squeeze information into a Powerpoint document using ODS POWERPOINT is limited, there are a number of sizing factors that really cannot be controlled via SAS, such as the amount of space PowerPoint allocates for text. If you need a large amount of text, like a 4x4 correlation matrix in PowerPoint, I would create it using the HTML output or PDF output or Excel output, and then copy and paste it into the PowerPoint. Certainly not ideal, but given the limitations of ODS POWERPOINT, I think it is the best solution I have found.

--
Paige Miller

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 4 replies
  • 1781 views
  • 0 likes
  • 4 in conversation