BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
chimanbj
Obsidian | Level 7

We are investigating the utility of SAS in creating a PowerPoint presentation on a recurring basis. From the information I have read about the ODS destination, it can only use a template that SAS creates; it cannot use a corporate template created in PowerPoint. Is there a way to deconstruct a PowerPoint template into code that SAS can use, similar to what can be done with Excel through XML code?

1 ACCEPTED SOLUTION

Accepted Solutions
Tim_SAS
Barite | Level 11

The PowerPoint ODS destination, just like all ODS destinations, gets its style (fonts, colors, etc.) information from an ODS style template. Ideally you would create a style template that matches your corporate template and use it when creating your presentations. I'm aware that many PowerPoint templates have style features that are not possible to emulate with ODS style templates so you may not be able to get an exact match. However, you can go a long way with careful selection of title and body fonts, colors, transparency, spacing, and background images. See for example Tech Support's Sample 53334, which shows how to put your corporate logo in the background of your slides.

If you want to try RW9's suggestion, it will still help to create the presentation using an ODS style template that matches your corporate template as much as possible, especially the fonts. You should create the presentation using the same fonts that will be used when you give the presentation. The reason is that ODS uses the fonts specified in the style to lay out the text on the slide. If you copy the slide to a presentation that uses a font that is different from the font you used to create the slide, PowerPoint often will wrap or not wrap your titles/table cell content to fit and the results aren't pretty.

You can read about custom style templates for PowerPoint in my SGF 2013 paper, starting on page 8.

View solution in original post

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

An interesting question.  In my opinion the answer would be no first off, without a fair bit of work.  My reasoning:

Excel, and RTF/Word, are basic flat files which contain data.  Powerpoint on the otherhand is a container, it can have pictures (yes, ok RTF can do that too), films, animations, etc.  When you export data via XML tagset to Excel, Excel reads in and interprets the XML and fills out a table.  Pretty straightforward.  To do the same for Powerpoint would mean writing quite a complex tagset.

It is not impossible, I just think it will be very hard.  For instance, if you rename your .pptx file to .zip and then have a look through, that is the Open Office file structure, you could recreate that in your program.  Alternatively you could create the XML in your program for a Powerpoint XML file (Open a powerpoint -> SaveAs Powerpoint XML, then right click on the file open in Notepad) however if you look at it for a simple one the code can get huge as not only location, picture info etc. is there.  Again, not impossible, just implausible.

The final point is why you want to?  Why not produce your outputs and then manually compile them into a template file that already exists.  I would imagine that this is the way most people end up with Powerpoint presentations, as you want to ensure they fit, maybe add animations etc. none of which you would want in your output generation code.

chimanbj
Obsidian | Level 7

Your alternative is interesting.  If I understand you correctly, you're suggesting that I create a basic PowerPoint file with SAS and then put the slides into the corporate template, which would then adjust for margins, colors, etc. 

That's thinking outside the box!

Thanks!

RW9
Diamond | Level 26 RW9
Diamond | Level 26

TBH though if it was me, I would just gather outputs, take a copy of the corperate template, and then build it myself in Powerpoint.  Its far easier and you have more control that way.  Actually doing things in a programmatic way may be far more effort than just doing it manually.

Good luck. 

Tim_SAS
Barite | Level 11

The PowerPoint ODS destination, just like all ODS destinations, gets its style (fonts, colors, etc.) information from an ODS style template. Ideally you would create a style template that matches your corporate template and use it when creating your presentations. I'm aware that many PowerPoint templates have style features that are not possible to emulate with ODS style templates so you may not be able to get an exact match. However, you can go a long way with careful selection of title and body fonts, colors, transparency, spacing, and background images. See for example Tech Support's Sample 53334, which shows how to put your corporate logo in the background of your slides.

If you want to try RW9's suggestion, it will still help to create the presentation using an ODS style template that matches your corporate template as much as possible, especially the fonts. You should create the presentation using the same fonts that will be used when you give the presentation. The reason is that ODS uses the fonts specified in the style to lay out the text on the slide. If you copy the slide to a presentation that uses a font that is different from the font you used to create the slide, PowerPoint often will wrap or not wrap your titles/table cell content to fit and the results aren't pretty.

You can read about custom style templates for PowerPoint in my SGF 2013 paper, starting on page 8.

jakarman
Barite | Level 11

Interesting for the positioning and goal of ODS powerpoint. It is generating  a ppt that is more static thereafter 
The AMO is integrating a connection with sas into a PPT more a dynamic approach.   

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 5 replies
  • 4614 views
  • 8 likes
  • 4 in conversation