Excel Namespace Classes for Extending the Office Object Model in VSTO

By Bill Sempf, Peter Jausovec

Part of VSTO For Dummies Cheat Sheet

In VSTO, the Microsoft.Office.Tools.Excel namespace contains classes that are relevant to the Microsoft Office Excel application. Here are the class names, along with short descriptions:

  • Workbook: This class represents the Workbook object from the Excel object model.

  • Worksheet: Worksheet class extends the functionality of the Worksheet class from the Excel object model, exposes events, and acts as a container for controls.

  • ChartSheet: This class represents an Excel worksheet that contains only a chart.

  • Chart: Chart control represents a chart object and exposes events.

  • ListObject: ListObject control is used to display data in rows and columns.

  • NamedRange: A NamedRange control represents a range that has a unique name and exposes the following events: BeforeDoubleClick, BeforeRightClick, BindingContextChanged, Change, Deselected, Selected, SelectionChange.