License

Licensed under a Creative Commons License

Disclaimer

All data and information provided on this site is on an as-is basis and for informational purposes only. We do neither guarantee for accuracy, completeness, suitability or validity of information on this blog nor be liable for any errors in this information or any damages arising from its use. This blog may contain links to other web sites. We do not have any control over the content contained on those sites.

Saturday, May 05, 2012

Embed Tableau Visualizations in PowerPoint

How to embed Tableau Visualizations in PowerPoint Presentations – an alternative without using an add-in

The way stories and insights are presented to the management is fundamentally changing. For a very long time management presentation were based on PowerPoint decks with embedded static images of the data visualizations.

Nowadays, requirements have gone up. Static data visualizations are not sufficient anymore. Especially during presentations based on data analysis, it is expected that the presenter is able to answer questions on the data live during the meeting.

Tableau Software meets exactly this requirement. The highly interactive dashboard features and the ability to build new views on the fly by dragging and dropping enables you to answer almost every possible question on the data live.

However, in most cases your dashboard or data visualization will not cover all topics of your presentation. So what to do? Switching back and forth between PowerPoint and Tableau during the presentation? Well, this is an option, but it is inconvenient for the presenter and not a seamless experience for the audience.

So, what we need is a way to embed the Tableau visualization directly into the PowerPoint presentation. This will not only guarantee a seamless interactive presentation but also provide the option to distribute the PowerPoint file to the audience including an interactive Tableau dashboard.

Earlier this week my Tableau blogging colleague Andy Kriebel published a great article on his blog VizWiz how to embed a Tableau dashboard into a PowerPoint presentation using the free LiveWeb Add-In:

Why? The Disadvantages of using an Add-In

What if you can’t install the add-in? Especially in corporate environments very often only system administrators have the right to install additional software, even if it is “only” an add-in. If you don’t have those rights, you can’t use the add-in.

Even if you can install the add-in on your computer, what if you have to do the presentation using someone else’s computer? You’d have to make sure that the add-in is installed there, too.

What if you want to distribute the presentation to your audience? They would only be able to see the embedded Tableau workbook if all of them have the add-in installed.

If you are facing only one of those problems, you are probably looking for some kind of “stand-alone” alternative. Today’s post fills this gap.

The Idea

The idea is simple: instead of using the add-in, we define our own little process how to insert a Web Browser into your PowerPoint presentation and write a tiny VBA code snippet to navigate the browser to the link of our Tableau workbook.

The Heart of the Solution: The Web Browser Control

The heart of the solution (of the add-in as well as of my VBA approach) is the Microsoft Web Browser Control. All you ever wanted to know about this control object can be found at the MSDN library. The Web Browser object provides a fully functional Internet browser inside your PowerPoint presentation (or any other Office application). You can interact with your Tableau workbook as if you would have opened it using the Internet Explorer or any other browser.

The Simple Version

Here are the main steps of the most simple implementation (referring to Microsoft PowerPoint 2007/2010): a Web Browser on a slide and the URL of the Tableau workbook hardcoded in the VBA code:

Step 1: The PowerPoint File

Open an existing PowerPoint presentation or create a new one, insert a new slide (layout title only or blank) and save it as a PowerPoint Macro-Enabled Presentation.

Step 2: The Web Browser

Go to the Developer Tab and click on “More Controls” in the Controls section:

In the following dialog scroll down to the Microsoft Web Browser and click OK:

You should have something like this now on your PowerPoint slide:

Step 3: The VBA Code

Double click on the Web Browser and the VBE (Visual Basic Editor) will automatically pop up with a predefined event-driven sub (WebBrowser1_StatusTextChange):

Replace the text of the link (Const URL_LINK = “…”) by the full link to your own Tableau workbook.

Close the VBE and save and close the presentation.

Step 4: The Test

You are already good to go. Open the presentation again, enable macros and start the slide show. Please keep in mind that you will only see the Tableau workbook in the slide show, not in the normal PowerPoint editing view. And please be patient. It takes a few seconds until the Tableau workbook will be loaded.

The Enhanced Version

The simple version described above already does the job. However, every time you want to use another workbook, you have to edit the VBA code, i.e. the defined constant URL_LINK (see step 3 of the simple version). No big deal, but it is more convenient to have the option to change the link directly on the slide.

Here is how to, building upon the simple version described above:

Step 1: Insert a Text Box

Insert a text box on your slide and paste the link to the Tableau workbook into it:

Step 2: Rename the Text Box

We want to rename the text box in order to easily refer to it in the VBA code later on. So, on the Home Tab click on Select and Selection Pane:

In the Selection Pane, click on the textbox and rename it to “URL_textbox”:

If you don’t like to see the text box on your slide, you can make it invisible by clicking on the little eye symbol right to in the Selection Pane or (more brute-force) you format it with a white text color.

Step 3: Change the VBA Code

Go to the VBE (ALT-F11), delete the existing code and replace it by the following lines:

Close the VBE and save and close the presentation. Re-open it again, enable macros and test it: change the URL in the textbox and start the slide show. If the entered URL is a valid link the web browser will now show the according Tableau workbook.

The Deluxe Version

If you are using only one Tableau workbook in your presentation, the two approaches described above will do the job. But what if you want to show more than one Tableau workbook? Sure, you can add additional slides, additional Web Browsers and additional VBA code. Wouldn’t it be nice to have all the workbooks available on one slide and an interactive feature to select from? Yes? Here you go:

First open or create a macro-enabled PowerPoint presentation and insert a Web Browser object (see steps 1 and 2 of the simple version). Then conduct the following steps:

Step 1: Insert an additional slide

Add an additional slide to your presentation and insert a two-column table:

We use this slide to define the names of the Tableau workbooks (first column) and their URLs (second column). Insert as many rows as needed (number of Tableau workbooks you want to select from) and paste in the names and the URLs.

In the Selection Pane we name this table as “Table1” and in the slides pane on the left we right click on the slide and select “Hide Slide” to make sure it is not included in the slide show:

Step 2: Insert an Combo Box

Insert a Combo Box from the Controls section on the Developer Tab and position it somewhere on the slide, e.g. at the top right.

Step 3: Insert a Command Button

This step is optional. If you want to have an easy way to update the Combo Box after changing entries in the definition table (see step 1), you can insert a Command Button to trigger an initialization routine. If you don’t want a Command Button on your slide, you have to run the initialization routine manually after changing the definition table (press ALT-F8 for the macros dialog and then select and run the sub InitializeComboBox).

Step 4: The VBA Code

Go to the VBE and paste the following code into the slide object:

Option Explicit

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) On Error Resume Next If URL = "" Then InitializeComboBox WebBrowser1.Navigate ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes("Table1") _ .Table.Cell(2, 2).Shape.TextFrame.TextRange.Text End If End Sub

You already know what to do: Close the VBE and save and close the presentation, re-open it again, enable macros and test it starting a slide show.

That’s it. A Web Browser Object, a few lines of VBA code, 5 simple steps and you are good to go:

The Disadvantages

If you are not able to use the LiveWeb add-in, the VBA approaches described above are a viable alternative.

However, you should be aware of the fact that they come with a few disadvantages:

Time for implementation

Yes, you need some additional time to set up your PowerPoint presentation, especially for the deluxe version. The simple or enhanced version, however, don’t take much more time than the LiveWeb add-in wizard.

Macro-enabled PowerPoint presentations

The approach described above is stand-alone, i.e. it does not need an add-in. However, it relies on the VBA code, so the user viewing the slide show has to enable macros after opening the presentation. No big deal, but you have to know that and many people are not familiar with the fact that PowerPoint presentation can use macros, too.

Web Browser approach

I know, I am stating the obvious, but all this is only working if you published your Tableau workbook to a server like Tableau Public. Even the title of this post is an exaggeration somehow. We are not embedding a Tableau workbook, we are simply embedding a browser navigating to a link of a Tableau workbook on a server.

No new views

Since the approach is only linking to a Tableau workbook on a server, you cannot build new views during your presentation. The interaction with the data is limited to the views and dashboards in your workbook and the existing interactive features like filtering, highlighting, sorting, etc.

Performance

The Web Browser needs a few seconds to navigate to the Tableau workbook and the interaction with the workbook is not as seamless as it could be. If you are using Tableau workbooks “embedded” into your PowerPoint, you have to live with the fact that you have a performance decrease compared to switching to the “real” Tableau workbook. Please decide for yourself.

No Print

If you print the presentation, the slide with the Web Browser will show nothing in the print-out. Not a big problem from my point of view, because we are all still printing way too much. However, you should be aware of this pitfall.

Agreed, quite a list of disadvantages, but except for the first two bullet points all of them apply to the add-in approach as well.

Download the Presentations

Here is a link to a zipped folder with all three PowerPoint presentations (version 2007/2010) described above:

Acknowledgement

Many thanks go to Andy Kriebel for the fantastic work he does on his blog VizWiz and for inspiring me to write this article. Andy is a real Tableau champion and VizWiz is one of my top 5 favorite Tableau blogs, providing dozens of invaluable Tableau tips and tricks. I already learned a ton. Thank you very much, Andy!

Comments

Embed Tableau Visualizations in PowerPoint

How to embed Tableau Visualizations in PowerPoint Presentations – an alternative without using an add-in

The way stories and insights are presented to the management is fundamentally changing. For a very long time management presentation were based on PowerPoint decks with embedded static images of the data visualizations.

Nowadays, requirements have gone up. Static data visualizations are not sufficient anymore. Especially during presentations based on data analysis, it is expected that the presenter is able to answer questions on the data live during the meeting.

Tableau Software meets exactly this requirement. The highly interactive dashboard features and the ability to build new views on the fly by dragging and dropping enables you to answer almost every possible question on the data live.

However, in most cases your dashboard or data visualization will not cover all topics of your presentation. So what to do? Switching back and forth between PowerPoint and Tableau during the presentation? Well, this is an option, but it is inconvenient for the presenter and not a seamless experience for the audience.

So, what we need is a way to embed the Tableau visualization directly into the PowerPoint presentation. This will not only guarantee a seamless interactive presentation but also provide the option to distribute the PowerPoint file to the audience including an interactive Tableau dashboard.

Earlier this week my Tableau blogging colleague Andy Kriebel published a great article on his blog VizWiz how to embed a Tableau dashboard into a PowerPoint presentation using the free LiveWeb Add-In: