The SAS Output Delivery System and reporting techniques

ODS Powerpoint - from a template?

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

ODS Powerpoint - from a template?

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?


Accepted Solutions
Solution
‎09-16-2014 10:21 AM
Super Contributor
Posts: 394

Re: ODS Powerpoint - from a template?

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


All Replies
Esteemed Advisor
Esteemed Advisor
Posts: 6,726

Re: ODS Powerpoint - from a template?

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.

Contributor
Posts: 25

Re: ODS Powerpoint - from a template?

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!

Esteemed Advisor
Esteemed Advisor
Posts: 6,726

Re: ODS Powerpoint - from a template?

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. 

Solution
‎09-16-2014 10:21 AM
Super Contributor
Posts: 394

Re: ODS Powerpoint - from a template?

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.

Valued Guide
Posts: 3,206

Re: ODS Powerpoint - from a template?

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 --<-----
Post a Question
Discussion Stats
  • 5 replies
  • 1307 views
  • 8 likes
  • 4 in conversation