Microsoft KB Archive/898513

= How to insert or paste an Excel 2003 worksheet or an Excel 2002 worksheet to a drawing in Visio =

Article ID: 898513

Article Last Modified on 11/14/2006

-

APPLIES TO

 Microsoft Office Visio Professional 2007 Microsoft Office Visio Standard 2007 Microsoft Office Visio Professional 2003 Microsoft Office Visio Standard 2003 Microsoft Visio 2002 Professional Edition Microsoft Visio 2002 Standard Edition, when used with:  Microsoft Office Excel 2003

 Microsoft Excel 2002 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

<div class="summary_section">

SUMMARY
''This article describes how to insert or paste a Microsoft Office Excel 2003 worksheet or a Microsoft Excel 2002 worksheet to a drawing in Microsoft Office Visio. To embed or link an Excel worksheet in a Visio drawing, you can use the Object command on the Insert menu, or you can use the Paste Special command on the Edit menu. This article also describes a method that you can use to display an Excel worksheet that contains many columns and rows in a Visio drawing.''

<div class="notice_section">

IN THIS TASK

 * INTRODUCTION
 * Embed or link an Excel worksheet in a Visio drawing by using the Object command on the Insert menu
 * Embed or link an existing Excel worksheet
 * Embed a new Excel worksheet
 * Embed or link an Excel worksheet in a Visio drawing by using the Paste Special command on the Edit menu
 * Display a large Excel worksheet in a Visio drawing
 * Fit the Excel worksheet to the Visio drawing page
 * REFERENCES

<div class="summary_section">

INTRODUCTION
This article describes how to insert or paste an Excel 2003 worksheet or an Excel 2002 worksheet to a drawing in Visio. You can use the Object command on the Insert menu, or you can use the Paste Special command on the Edit menu to embed or link an Excel worksheet in a Visio drawing. This article also describes a method that you can use to display a large Excel worksheet in a Visio drawing.

When you embed an Excel worksheet in a Visio drawing, the Excel worksheet becomes part of the drawing. The contents of the embedded Excel worksheet are no longer part of the source file. When you double-click the embedded Excel worksheet in the drawing, Excel runs in place. That is, you run Excel from within Visio. Excel toolbars appear, and you can work directly in the Excel worksheet.

When you link an Excel worksheet in a Visio drawing, the contents of the Excel worksheet are stored in the source file. The Visio drawing only stores the location of the Excel worksheet. Information in the Excel worksheet is updated only when you update the contents of the source file in Excel.

back to the top

Embed or link an Excel worksheet in a Visio drawing by using the Object command on the Insert menu
Use the Object command on the Insert menu to insert an Excel worksheet in your Visio drawing. You can embed or link an existing Excel worksheet, or you can embed a new Excel worksheet. To do this, use one of the following methods, depending on your situation.

Embed or link an existing Excel worksheet

 * 1) Start Visio, and then open your drawing.
 * 2) Click Object on the Insert menu, and then click Create from file.
 * 3) Click Browse. In the Browse dialog box, locate the Excel spreadsheet that you want to insert, click the Excel spreadsheet, and then click Open.
 * 4) Click OK.
 * 5) Use one of the following steps, depending on your situation:
 * 6) * If you want to embed the Excel worksheet, make sure that the Link to file check box is not selected. If the Link to file check box is selected, click to clear the Link to file check box.
 * 7) * if you want to link the Excel worksheet, click to select the Link to file check box.
 * 8) If you want to display the Excel worksheet as an icon in your drawing, click to select the Display as icon check box.

Note When you click to select the Display as icon check box, the Excel spreadsheet is displayed as an icon in your drawing. To view the contents of the Excel spreadsheet, double-click the icon.
 * 1) Click OK.

back to the top

Embed a new Excel worksheet

 * 1) Start Visio, and then open your drawing.
 * 2) Click Object on the Insert menu.
 * 3) Click Microsoft Office Excel Worksheet in the Object type list, click Create new, and then click OK.
 * 4) Double-click the embedded Excel worksheet, and then add the data that you want. When you finish working in the Excel worksheet, click an area of the drawing page that is outside the Excel worksheet to display the Visio toolbars again.

back to the top

Embed or link an Excel worksheet in a Visio drawing by using the Paste Special command on the Edit menu
Use the Paste Special command on the Edit menu to paste an Excel worksheet to your Visio drawing. You can use this method to embed or link all cells of an existing Excel worksheet or to embed or link some cells of an existing Excel worksheet. To do this, follow these steps:
 * 1) Start Excel, and then open the worksheet that you want.
 * 2) Select the cells that you want. To select all the cells in the worksheet, click the Select All button.
 * 3) On the Edit menu, click Copy.
 * 4) Start Visio, and then open your drawing.
 * 5) On the Edit menu, click Paste Special.
 * 6) Use one of the following steps, depending on your situation:
 * 7) * If you want to embed the Excel worksheet, click Paste if it is not already selected, and then click Microsoft Office Excel Worksheet in the As list.
 * 8) * If you want to link the Excel worksheet, click Paste link.
 * 9) If you want to display the Excel worksheet as an icon in your drawing, click to select the Display as icon check box.

Note When you click to select the Display as icon check box, the Excel spreadsheet is displayed as an icon in your drawing. To view the contents of the Excel spreadsheet, double-click the icon.
 * 1) Click OK.

back to the top

Display a large Excel worksheet in a Visio drawing
When you embed a large Excel worksheet that contains many column and rows, you may not be able to see all the columns and rows of the embedded worksheet in the drawing. Note that if you double-click the embedded Excel worksheet, horizontal and vertical scroll bars appear in the Excel worksheet. You can use the scroll bars to view all the columns and rows in the embedded worksheet.

To display all the cells of a large Excel worksheet in a Visio drawing, use the following method as an alternative to embedding the worksheet in a drawing. First, copy the Excel worksheet as a picture. Then, paste the picture to your Visio drawing. To do this, follow these steps: <ol> To copy the contents of the Excel worksheet as a picture, follow these steps: <ol style="list-style-type: lower-alpha;"> Start Excel, and then open the worksheet that you want.</li> Press CTRL+END to move to the last cell on the worksheet.</li> Press SHIFT+CTRL+HOME to select the whole range of cells.</li> Press SHIFT, and then click Copy Picture on the Edit menu.</li> In the Copy Picture dialog box, verify that As shown on screen is selected under Appearance. Then, verify that Picture is selected under Format.</li> Click OK.</li></ol> </li> To paste the picture to your Visio drawing, follow these steps: <ol style="list-style-type: lower-alpha;"> Start Visio, and then open your drawing.</li> On the Edit menu, click Paste.</li></ol> </li></ol>

back to the top

Fit the Excel worksheet to the Visio drawing page
When you insert or paste an existing large Excel worksheet to your Visio drawing, parts of the worksheet may appear outside the Visio drawing page. To fit the Excel worksheet to the drawing page, use one of the following methods, depending on your situation:
 * Resize the drawing page. To resize the drawing page, press CTRL, and then drag the edge of the drawing page so that the worksheet fits in the drawing page.
 * Resize the columns in the worksheet before you embed the worksheet in a Visio drawing or before you copy the worksheet as a picture. Then, paste the picture to a Visio drawing. When you resize the columns in a worksheet, you change the formatting of the worksheet. Therefore, you may want to try this method by using a test worksheet before you use this method in the worksheet that you want to display in a Visio drawing. To resize the columns in the worksheet, follow these steps:
 * Start Excel, and then open the worksheet that you want.
 * On the Format menu, point to Column, and then click AutoFit Selection.

Note If you want to undo the autofit operation, click the Undo button.

back to the top

<div class="references_section">