Automating Excel by Using Extended Objects
When you develop Excel solutions in Visual Studio 2010, you can use host items and host controls in your solutions. These are objects that extend certain commonly used objects in the Excel object model (that is, the object model that is exposed by the primary interop assembly for Excel), such as the Microsoft.Office.Interop.Excel.Worksheet and Microsoft.Office.Interop.Excel.Range objects. The extended objects behave like the Excel objects they are based on, but they add additional features such as new events and data binding capabilities to the objects.
Applies to: The information in this topic applies to document-level projects and application-level projects for Excel 2007 and Excel 2010. For more information, see Features Available by Office Application and Project Type.
Host items and host controls are available in both application-level add-ins and document-level customizations, although the context in which these can be used is different for each type of solution. For more information, see Host Items and Host Controls Overview.
Excel projects give you access to several host items:
Worksheet. This host item contains represents a worksheet in your project. It also acts as a container for managed controls, including host controls and Windows Forms controls, and it maintains information about the controls on its surface. For more information, see Worksheet Host Item.
Workbook. This host item represents the workbook in your project, and acts as a container for components that are shared by all worksheets in the workbook. For more information, see Workbook Host Item.
There are several host controls for Excel that help you create, organize, and automate workbooks and worksheets. These host controls provide events and data-binding capabilities that their counterparts in the native Excel object model do not have.
For more information about the host controls you can use in Excel projects, see the following topics: