Welcome to MSDN Blogs Sign in | Join | Help

Microsoft Excel

The team blog for Microsoft Excel and Excel Services.
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.

Posted: Monday, April 17, 2006 1:15 PM by David Gainer
Filed under:

Comments

Harlan Grove said:

With regard to pasting an entire workbook to paste a chart, one of the options shown in the smart tag above, one of the things Office could do better is handling multiple objects pasted from, say, Excel into Word. If there were two charts in XL.xls that should appear in Word.doc, it seems Word.doc needs to embed an entire copy of XL.xls for each chart. Will Office 2007 address this, allowing multiple objects from a single embedded copy of and Excel workbook to appear in different places in a Word document?
# April 18, 2006 2:50 AM

Niklas said:

Dear David, I hope you pardon this being slightly off-topic, but your use of <i>two</i> space-characters between every sentence annoys. Doesn't the grammar-checker in MS Office mark that as erroneous? I'm not trying to be cynical. Sincerely, Niklas
# April 18, 2006 7:00 AM

Jon Peltier said:

Re Harlan's post about the embedded chart carrying the entire workbook with it into the parent document.

I'm not sure, given the flexibility we have in Excel for charting data from anywhere within the workbook, that it's feasible to include just the chart and a datasheet. To allow the user to open the embedded chart and change the data range requires that hte rest of the data be available.

The savvy user can improve the situation through planning and careful data structuring (yeah, right). If each chart to be imported into another application's document is set out in its own workbook, with a single data sheet with any and all data it would ever need, there would be no need for embedded object bloat.

Unfortunately most users do not give any forethought to the ultimate usage of their charts, or even really to the right-now usage of their workbooks. It's not right from the start, so it's not right at the end.
# April 18, 2006 8:11 AM

Jon Peltier said:

I'm disappointed that the vast majority of effort in Excel charting has been in prettifying charts, and little has gone into improving the charts themselves, broadening the options for chart types, and reducing the need for clever workarounds.

If in fact the usage of charts in PowerPoint and Word is simplified as much as this article suggests, however, that will be a significant improvement. Especially interesting is the ability to use a full-featured Excel chart instead of a chart made by MS Grump.
# April 18, 2006 8:14 AM

Paul said:

Hi David:

Thanks you very much first for your blog. One Charting related question - I have been hoping that one day we would have more control of a Chart's Data Table. For Instance, I would like to plot Sales, but then have the % Chg In Sales in the Datatable (i.e. the % Chg In Sales is NOT plotted, but supplemental to the Chart. In addition, in this case, Sales is NOT part of the Datatable). We have worked around this somewhat currently by plotting this supplemental Data and then Deleting this supplemental Plotted Series in the Chart. Any hope for more control of a Chart's Datatable?
# April 18, 2006 5:53 PM

CG said:

Harlan:

Regarding your question on "allowing multiple objects from a single embedded copy of an Excel workbook to appear in different places in a Word document":

In Office 2003 you can achieve your scenario by using links to an embedded sheet.  There are various ways to do this depending on what exactly you're trying to do, but here are the simplest steps:
1. Start excel, enter data into sheet, copy data to clipboard.
2. Start Word, do Edit-PasteSpecial-ExcelWorksheetObject to paste embedded sheet into Word.
3. Right-click on embedded sheet and execute the WorksheetObject-Open command to open the sheet in excel (I used Open rather than Edit so as to bypass the inplace editing mode).
4. In the open excel sheet, create two charts (of the same or different styles, based on the same or different (possibly overlapping) selections of the sheet's data).
5. Copy one of the charts to the clipboard and paste it into Word, choosing "Link to Chart" on the paste smart tag menu.  (Or you can use PasteLink from the PasteSpecial dialog.)
6. Repeat step 5 for the other chart.
7. Close the running Excel sheet, and save the Word document.

You now have in Word, two OLE links to different charts in the single embedded excel sheet.

To test this, right-click on the embedded excel sheet and execute WorksheetObject-Open command to run the embedded sheet in excel.  Change the data in the running embedded sheet and you'll see both linked charts in Word updated to reflect the changed data.

In the above steps, you end up with three OLE objects: one embedded sheet (containing the data and two charts, though only the data is displayed in Word) and two links to the charts in that embedded sheet.  You could instead just have two OLE objects: one embedded chart (which includes the embedded sheet data) and one link to a second chart in the embedded chart's sheet.

I think this has been doable since at least Office 95 (probably even before that; this functionality likely was available with the first OLE2 versions of Excel and Word which were Win3.1 apps).
# April 18, 2006 9:49 PM

Harlan Grove said:

CG,

Thanks. It works. The key seems to be Open rather than Edit the embedded workbook.
# April 19, 2006 12:04 AM

Shane Devenshire said:

Unrelated suggestions - the QAT is a major headach for many of us.  Here are a couple of suggestions besides the obvious one of revamping this whole idea:

1. Allow additional rows of the QAT to be locked on (open).  I don't like this that much, but its better than the current implementation in my opinion.

2. Allow the QAT to have multiple versions which could be turned on or off directly from the toolbar itself, for example a Chart QAT, a PivotTable QAT, a General QAT (there could be an unlimited number of these bars created by the user. In reality they could be one bar for which the user's choice is just toggling the display of the active tools.  The names just imply how or why the user might create these various bars.

3. To replace the functionality of tear off palettes, a feature that many users love, you could add drop down tools for the QAT which could be “pinned” open by the user.  For example, consider any of the galleries or drop downs such as Font Color.  If the tool could be added to the QAT and then “pinned” open the functionality of the tear off palettes could be partially duplicated. This would be similar or identical to the “pinned” pop-outs in Visio.

shanedevenshire@sbcglobal.net
# April 19, 2006 12:40 AM

Lia Decocker said:

Will we be able to set the min and max value of an axis in a cell in the spreadsheet?
Currently, you can only change it "manually" by typing in the actual value.
# April 19, 2006 4:32 AM

David Gainer said:

Hi folks, thanks for the comments.

Niklas, way back when I was in university studying English Lit, I was taught to use two spaces.  Since then, I have heard lots of arguments re:1 vs 2.  Word can be set to not worry about it (default) or check for 1 or 2, so that, along with a quick look through “A Manual For Writers” tells me that it is up to the author.  My personal belief is that it makes things easier to read …

Paul, unfortunately not in this version.

Shane, thanks for the feedback.  The UI team has heard this loud and clear, and I will let you know if there is any change.

Lia, unfortunately we did not make that change this version.
# April 19, 2006 11:14 PM

Nyk Jones said:

I have been using Excel for many years now, and each time I hear there will be a new version out I hope that a few small features have been added to make my life a lot easier when creating charts. Can you tell me if any of them will be included in Excel 12.

They are:
1) Being able to give a cell reference to define the minimum and maximum values for the scales on a xy scatter chart, (the major and minor tick values would be good too).

2) When plotting with a log scale, being able to set a minimum/maximum which is not just e.g. 0.1, 0.01, 10, 10000, but values such as 0.5, 150, 0.09, 2000, etc.

3) Being able to use the second x-axis in a scatter plot to show a different scale for the plotted data (e.g. if the bottom is in nanometers I would like to show the corresponding values in electronvolts on the top axis)

As a scientist who uses Excel for analysis and presentation of data (e.g. spectra showing some intensity against changing time or energy), I would find the second two items particularly useful.

I haven't been able to find anything about this in any area of your blog, so I hope you don't mind me asking it here.

# April 20, 2006 9:29 AM

free lessons said:

first i have to say : nice blog ,
second you can teach other people with our free movies (wisetrainer.com).
# April 23, 2006 5:31 AM
New Comments to this post are disabled
Page view tracker