Delen via


Excel Template Node

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Document-level projects

Microsoft Office version

  • Excel 2007

  • Excel 2003

For more information, see Features Available by Application and Project Type.

The Microsoft Office Excel template node in Solution Explorer does not have a code file or a design surface. The Excel template node serves only as a container for the worksheet and workbook code files and designers.

If you right-click the Excel template node, you have the option to add a new worksheet or chart sheet to the template, or to rename the template. The worksheet and chart sheet are host items, which means that they have code files and they expose events that you can program against. For more information about these objects, see Worksheet Host Item and ChartSheet Host Item.

When you rename the template in Solution Explorer by using the shortcut menu, it renames the template in the project folder. If the solution is closed and you rename the template in the project folder by using Windows Explorer, Visual Studio will display the updated name the next time you open the solution. If the solution is open and you rename the template in the project folder, the name change will not show up in Solution Explorer until you close and reopen the solution.

Template vs. ThisWorkbook

The template node is a container for the code files and design surfaces of the worksheet and workbook. You cannot program against the template node.

ThisWorkbook (ThisWorkbook.vb or ThisWorkbook.cs) represents the workbook that you can program against; it has a code file and a designer, and it exposes events. For more information, see Workbook Host Item.

See Also

Concepts

Office Documents in the Visual Studio Environment Overview

Document vs. Template Files