Getting Started Programming Document-Level Customizations for Excel
The features in this topic are available only if you have the required applications installed.
For more information, see.
If you are just getting started creating document-level customizations for Microsoft Office Excel 2003 by using Microsoft Visual Studio 2005 Tools for the Microsoft Office System, here is what you need to know.
The Single Document Application Model
Each Excel customization you create by using Visual Studio Tools for Office is based around a single workbook. To start using the customization, the end user opens the workbook or creates the workbook from an Excel template. Events in the workbook, for example typing in cells or clicking buttons and menu items, can call event-handling methods in the assembly. For more information, see.
Using Host Controls
There are new controls available that enable you to program directly against named cell ranges and list objects the same way you program against controls on Windows Forms. These objects, called host controls, are based on native Excel objects, but they are extended with new events and data binding capability. They appear as first-class objects in the programming model and in IntelliSense, which makes it easier to refer to specific cells directly in your code without having to walk through the Excel object model.
Ranges and list objects are available on the Excel Controls tab of the Toolbox in Visual Studio (they are calledand ), and you can also add them to a worksheet the same way you do when you work with Excel by itself. For more information, see .
Using Data Binding
The host controls are also in the list of controls that you can drag from the Data Sources window. Adding host controls in this way automatically binds them to the data source that you set up using the window. Without writing any code, you can display data from databases, Web services, and objects in your worksheet. For more information, see.
For a list of topics that walk you through some of the common tasks in Excel automation, see.