Chapter 32. Using Excel Data in Word Documents

Using Excel Tables in Word Documents

Using Excel Charts in Word Documents

Using Excel to Supply Mail-Merge Data to Word

ITS many presentation features notwithstanding, Microsoft Excel 2010 is at heart an analytical tool. When it comes time to organize Excel 2010 data and present it in the context of a larger textual report, you need another Microsoft Office 2010 stalwart—Microsoft Word 2010. Naturally, Word 2010 is designed to work hand-in-hand with Excel, so you can easily do your analysis in Excel and transfer the results to Word when you need to incorporate tables and charts into a report.

In this chapter, we survey the few points you need to know when incorporating Excel tables and charts into Word. You’ll also see how you can use contact lists stored in Excel to generate form letters, mailing labels, and envelopes in Word.

You can create tables directly in Word, of course, but if your tables consist of more than a few rows or columns, you’ll probably find it simpler to build them in Excel and then transfer them to your Word documents. You can use either of the following methods to move a worksheet range from Excel into Word:

If you copy an Excel worksheet range to the Clipboard and then paste that range into Word (using either the Paste command or its keyboard shortcut, Ctrl+V), the options menu that appears below the lower-right corner of the pasted data, shown in Figure 32-1, provides quick access to the formatting options you’re most likely to want. These options are as follows:

The options menu provides two Link & Keep commands to link your Word table (in either Excel format or Word format) to its source in Excel. These are equivalent to selecting Paste Special and selecting the Paste Link option. We discuss these options later in this chapter. (See Paste-Linking an Excel Table into Word on page 969.)

The options menu that appears when you paste Excel data includes only the most commonly used formatting options. These will probably meet your needs in most cases. However, you sometimes might find the HTML badly rendered in Word. This has been known to happen, for example, when pasting from documents in older Excel file formats, but most of these problems appear to have been solved in Excel 2007 and 2010. If your Excel table (or any other pasted data) does arrive with formatting distortions in Word, all is not lost. Erase the pasted data in Word, and then try again using the Paste Special command in Word. (On the Home tab in Word, click the small arrow below Paste, and then click Paste Special.) Figure 32-2 shows this dialog box as it appears when your Excel document is still open. (If you close the Excel document, fewer options are available.)

With almost any of the formats displayed in the Paste Special dialog box, you can either paste or paste-link. We’ll look at the latter operation in Paste-Linking an Excel Table into Word on page 969. First, we’ll describe the available paste formats:

Pasting using the Worksheet Object format provides a completely faithful replication of the appearance of your Excel table—including any graphical elements that happened to be within your Excel selection. It also lets you edit the pasted table using Excel commands and features rather than Word ones. For example, if you want to apply a custom numeric format to your data after pasting it as an object into Word, you can do that by double-clicking the object. When you do this, the user interface of Word temporarily merges with Excel, as shown in Figure 32-3. After you edit the object and click any other part of the Word document, the Excel ribbon is replaced by the Word ribbon, and the worksheet column and row headings disappear.

An important peculiarity to note about Excel objects embedded in Word documents is that Excel embeds the entire workbook, not only the selection you copied to the Clipboard. The sheet tabs at the bottom of the Excel object shown in Figure 32-3 illustrate this point. Although the editing window that appears in Word when you double-click the Excel object has the same dimensions as the original selection in Excel, you can scroll to any part of the current worksheet and even switch to another worksheet in the same workbook. When you return to Word (by clicking away from the embedded object), Word treats any scrolling you do as an edit to the embedded object. If you switch from Sheet1 to Sheet2 while you’re editing, you’ll see Sheet2 when you return to your Word document.

You can paste-link any of the formats shown in Figure 32-2 and described in the preceding sections by selecting Paste Link in the Paste Special dialog box. When you do this, Word creates a field that references the source of your Excel data. The field is a code (comparable to an external-reference formula in Excel) that tells the application how to update the data if you request a manual update. The code also tells the application how to locate the data for editing if you double-click the linked information in your Word document. You can see the code by clicking the File tab in Word, clicking Options, selecting the Advanced category, and then selecting the Show Field Codes Instead Of Their Values check box, located in the Show Document Content section. Figure 32-4 shows the cryptic result, which you probably don’t want to leave like this in your Word document.

Links from Excel into Word are automatic by default, which means that anytime the Excel source is changed, the Word document is automatically adjusted. You can switch to manual linking by going to the Links dialog box shown in Figure 32-5. To get there, right-click the Excel table in the Word document, click Linked Worksheet Object, and then click Links.

If you’re using manual updating, you can also force an update by clicking Update Now in the Links dialog box. A simpler way to update your table is to select it and press F9.

The Clipboard methods just described are fine for importing existing Excel tables into Word documents. If you’re creating a table from scratch, you have the option of using an alternative method—by clicking the Object command on the Insert tab in Word. When you do this, the Object dialog box appears. On the Create New tab, select Microsoft Excel Worksheet (you might need to scroll down the list a bit), and then click OK. Word displays a window into a blank Excel worksheet, as Figure 32-7 shows.

Here you can create your table by taking advantage of all the formatting and calculation tools in Excel. When your table is ready for inclusion in your Word document, click outside the Excel window. The result is an Excel object embedded in your Word file—exactly what you get if you create the table initially in Excel, copy it to the Clipboard, and then choose Microsoft Excel Worksheet Object from the Paste Special dialog box in Word.