Charting IV – Charts in PowerPoint and Word

One thing we know is that many of the charts that folks created in Excel end up in PowerPoint presentations or Word documents (I think the statistic is that 50% of all charts in PowerPoint presentations originate from Excel.  While users work in Excel to analyze their data, the final results are often given to others, and they rarely want to include all the intermediate steps from Excel.  Furthermore, users have all kinds of solutions to transfer their charts.  Most just use copy and paste, but some use Excel’s copy as picture command, or write VBA solutions, to update their charts in various ways.  In Office 2007, our goal was to make copying and pasting charts into PowerPoint and Word as easy as possible.  We also wanted the resulting charts to be as easy to use in PowerPoint and Word as they are in Excel, and we wanted to address a lot of problematic behaviours that existed in current versions of Office when you moved charts from Excel to PowerPoint one way or another.  Today I am going to briefly review the work that we did in this area.

Charts as OfficeArt Shapes

At the core of all the improvements we have made in this area, carts in PowerPoint 2007 and Word 2007 are just like charts in Excel 2007.  They are native objects in PowerPoint and Word, just like they are in Excel, and as a result, the user experience and behaviour is pretty much identical in all three applications.  They have the same themes, chart types, layouts, and styles that were discussed in the last article.  They even have almost the identical ribbons and dialogs as Excel 2007.  Here is a screenshot of charting in Word 2007 in a near-beta-2 build.  You can see how this is identical to what we looked at in Excel 2007 last week.

(Click to enlarge)

The chart’s default theme will come from the presentation or document, just as it does from the spreadsheet’s theme in Excel.  This ensures that your charts will match the rest of your document, whichever of the three applications you are using.
For Office developers, the entire chart object model from Excel is now available for charts in Word and PowerPoint too.  With a few modifications, it’s possible to migrate solutions that used the Microsoft Graph object model over to the new charts, although you can keep using Graph should you not want to migrate your code.

Data for Charts

There is one big difference, of course, between charts in Excel and charts in Word and PowerPoint – Word and PowerPoint don’t have a grid for the data.  The solution to that in Office 2007 is to use Excel for the chart data in all three applications.  When you create a chart in PowerPoint, PowerPoint and Excel tile side by side.  You can type the data in Excel, and watch the chart update in PowerPoint. Better still, you can use the full power of Excel for all charts, including formulas, connections to external data sources, and sorting & filtering.  When you are done entering the data, you can close Excel, and PowerPoint will return to full size.  In this case, the Excel spreadsheet containing your data is embedded in your PowerPoint document in case you need to edit it later.

(Click to enlarge)

You can also have a chart with data linked to an external file.  This allows you to update your document with the latest data from your spreadsheet, whenever you wish.  It also lets you share a document with someone else, without them needing the spreadsheet containing your calculations. They can even change the presentation and the chart formatting, and then you can update the data later.  We think this is a valuable scenario.  For those familiar with OLE linking & embedding for charts in previous versions of PowerPoint, it is important to remember that the chart is always part of the presentation, it is only the data that linked or embedded.  Therefore, you can edit the chart fully in PowerPoint – you only need the embedded or linked spreadsheet when you try to edit the data.  All of the above also applies to Word.

Copy and Paste of Charts

The primary way to transfer a chart from Excel to PowerPoint or Word is by copying them in Excel and pasting them into the presentation or document. This is a full fidelity paste – the chart will look exactly the same as it did in Excel. It is also the same on screen and when printed.  No more funny sizing problems, and because the chart is a native object in PowerPoint, all the PowerPoint features and tools just work. 

When you paste the chart into PowerPoint or Word from Excel, a smart tag appears that gives you several different paste options.

The second and third choices are to have embedded or linked data (as described in the previous section).  The last two choices also allow you to choose between the theme in the source spreadsheet, and the theme in the destination document.  You can keep your chart exactly as you had it in Excel, or make it automatically match the rest of your presentation.  The first choice allows you to choose to paste the chart as a picture in PNG format.  In that case, the chart can no longer be edited.

Microsoft Graph

Some of you may be wondering what happened to Microsoft Graph.  Microsoft Graph still exists in Office 2007, and it’s identical to previous versions (meaning that none of the improvements to charting have been added to Microsoft Graph).  Users of Microsoft Graph in Microsoft Access, for example, will find nothing has changed.  Microsoft Word documents in “compatibility mode”(more on what that is in a later post) continue to use Microsoft Graph as well.  PowerPoint and Word users who don’t have Excel will also get Microsoft Graph.  Finally, users can continue to use Insert Object to insert a Microsoft Graph object into any OLE application.

Charts and Excel Services

I’ve talked about and emphasized that workbooks on the client look as similar as possible in the browser.  Charts, too, can be generated on the server.  Currently, Excel services does not support 3D charts, and it does not support all of the OfficeArt formatting options from the client.  However, charts in the browser have a high degree of fidelity with charts in Excel.