site site-navbranch.xsl site

Skip to main content.

Looking for PowerPoint and/or Google Analytics solutions? Please follow the above links to

section no_callout.xsl no_callout

page static_html.xsl b2003_11_2

Generating PowerPoint from a SQL database

This example follows the model of the XML/A PowerPoint generator, except that now there is SQL embedded in the query XML instead of MDX. Each slide is generated from one of the <slide> tags in the XML by sending the corresponding query to SQLXML using the ISAPI interface. For each query, it populates a generic SQLXML template with the query and sends it to the IIS virtual directory which was setup by following verbatim the SQLXML3 documentation (see help page "Creating the nwind Virtual Directory")

Depending on your security settings, you may have to add the /un and /pw flags to the cmd file in order to pass credential info to the sql2ppt.wsf script (which then opens the nwind URL with them). An example of running this script is:

cscript sql2ppt.wsh /url:http://localhost/nwind /xml:queries.xml 
/ppt:landscape.ppt /xsl:master.xsl /out:presentation.ppt

This will run the queries in the file queries.xml and generate presentation.ppt

The great thing about this approach is the flexibility - put whatever you want in the powerpoint templates, and then created an XSL template which can populate it. You can even create funky stoplight and scorecard displays. Just name the shapes and write an XSL template to set labels and colors of those shapes.

I have included the file presentation.ppt which was generated with the script.

downloads: (148K)