BookmarkSubscribeRSS Feed
melhaf
Fluorite | Level 6

Hi, 

Maybe the topic wasen't the best, but here is a better explination of what I want to create 🙂 

I want to create a folder and within this folder, create an empty powerpoint with n sheets that will includes 'things', where 'things' is the the code I write (ex. histogram, tabulates, and even text (i.e strings?)

 

So I think I will demonstrate how I started, 🙂 

 

1) Create the folder:

%let year = 2023;  
options dlcreatedir;
libname out "PATH\&year";

This works fine

 

2) Then in this '2023'-folder, I would like to SAS to create a powerpooint.file automaticlly not by going in to this '2023'-folder and right click and do this by hand. Maybe I think I would do something like this: 

/* this creates the empty PowerPoint file, but it dosen't save it in the '2023-folder */ 

ods _all_ close;
options date nonumber;

 

3) Here is just some random data I picked up so I can try it.... and maybe it could help you guys also 🙂

proc sort data=sashelp.prdsale out=prdsale;
   by Country;
run;

4) And this would be the creating the excel file? But once again, it not

  • automaticlly doing this
  • and I don't know what to do with my 
libname out

some thing like this????

 

OUT.ods powerpoint file='PATH\test.pptx';

title 'Actual Product Sales';
title2 '(millions of dollars)';

And it dosen't work.

 

 

 

Q2: After this works, how do I interpret n sheets with example one with just text (description what this powerpoint is above for example) and one other sheets with tabulate/histograms WITH also explinations with text?

 

.. and it all will save this automaticlly in the '2023'-folder.

Sorry if my english is not good, it's not my 1st langauge.

Best regards,

M

1 REPLY 1
Reeza
Super User

Use ODS POWERPOINT.

 

title1 'PowerPoint Using Template Layout Twocontent with ODSLIST/GMAP';
footnote "The ODS Output Destination for PowerPoint";

ods powerpoint file="PATH/&year\Layout2List.pptx" layout=twocontent
    nogtitle nogfootnote;
proc odslist;
  item 'Pre-defined template';
  item 'Side-by-side output';
  item;
     p 'Use:';
     list / style=[bullet=check];
      item 'Tables';
      item 'Graphs';
      item 'Lists';
      item 'Text';
     end;
run;

goptions hsize=4.5in vsize=4.5in;
proc gmap map=maps.us data=maps.us all;
  id state;
  choro statecode/statistic=frequency discrete nolegend;
run;  
quit;

ods powerpoint;

https://support.sas.com/resources/papers/proceedings16/SAS5443-2016.pdf

https://support.sas.com/resources/papers/proceedings16/SAS3801-2016.pdf

 


@melhaf wrote:

Hi, 

Maybe the topic wasen't the best, but here is a better explination of what I want to create 🙂 

I want to create a folder and within this folder, create an empty powerpoint with n sheets that will includes 'things', where 'things' is the the code I write (ex. histogram, tabulates, and even text (i.e strings?)

 

So I think I will demonstrate how I started, 🙂 

 

1) Create the folder:

%let year = 2023;  
options dlcreatedir;
libname out "PATH\&year";

This works fine

 

2) Then in this '2023'-folder, I would like to SAS to create a powerpooint.file automaticlly not by going in to this '2023'-folder and right click and do this by hand. Maybe I think I would do something like this: 

/* this creates the empty PowerPoint file, but it dosen't save it in the '2023-folder */ 

ods _all_ close;
options date nonumber;

 

3) Here is just some random data I picked up so I can try it.... and maybe it could help you guys also 🙂

proc sort data=sashelp.prdsale out=prdsale;
   by Country;
run;

4) And this would be the creating the excel file? But once again, it not

  • automaticlly doing this
  • and I don't know what to do with my 
libname out

some thing like this????

 

OUT.ods powerpoint file='PATH\test.pptx';

title 'Actual Product Sales';
title2 '(millions of dollars)';

And it dosen't work.

 

 

 

Q2: After this works, how do I interpret n sheets with example one with just text (description what this powerpoint is above for example) and one other sheets with tabulate/histograms WITH also explinations with text?

 

.. and it all will save this automaticlly in the '2023'-folder.

Sorry if my english is not good, it's not my 1st langauge.

Best regards,

M


 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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