다음을 통해 공유


Microsoft.Office.Tools.Excel.Controls Namespace

The Microsoft.Office.Tools.Excel.Controls namespace contains a set of Windows Forms controls that can be used on a Worksheet host item in an Office solution. Each of these classes extends a base class that is in the System.Windows.Forms namespace with additional functionality specific to a Microsoft Office Excel worksheet. For example, the Microsoft.Office.Tools.Excel.Controls.Button class extends the functionality of the System.Windows.Forms.Button class.

You can add and remove the controls in this namespace at run time by using the appropriate method. For example, use the AddButton method to add a Microsoft.Office.Tools.Excel.Controls.Button to a worksheet at run time. For more information, see Adding Controls to Office Documents at Run Time.

In a document-level project for Excel, you can also add the controls in this namespace to your Excel worksheet at design time by dragging a control from the Toolbox directly to your document. For more information, see How to: Add Windows Forms Controls to Office Documents.

There are some differences between Windows Forms controls that are added to Excel worksheets and Windows Forms controls that are added to Windows Forms. For more information, see Limitations of Windows Forms Controls on Office Documents.

Classes

  Class Description
Public class Button Represents a Windows Forms button that can be added to a Microsoft Office Excel worksheet.
Public class CheckBox Represents a Windows Forms check box that can be added to a Microsoft Office Excel worksheet.
Public class CheckedListBox Represents a Windows Forms CheckedListBox that can be added to a Microsoft Office Excel worksheet.
Public class ComboBox Represents a Windows Forms ComboBox that can be added to a Microsoft Office Excel worksheet.
Public class DataGridView Represents a Windows Forms DataGridView that can be added to a Microsoft Office Excel worksheet.
Public class DateTimePicker Represents a Windows Forms DateTimePicker that can be added to a Microsoft Office Excel worksheet.
Public class DomainUpDown Represents a Windows Forms DomainUpDown that can be added to a Microsoft Office Excel worksheet.
Public class HScrollBar Represents a Windows Forms HScrollBar that can be added to a Microsoft Office Excel worksheet.
Public class Label Represents a Windows Forms Label that can be added to a Microsoft Office Excel worksheet.
Public class LinkLabel Represents a Windows Forms LinkLabel that can be added to a Microsoft Office Excel worksheet.
Public class ListBox Represents a Windows Forms ListBox that can be added to a Microsoft Office Excel worksheet.
Public class ListView Represents a Windows Forms ListView that can be added to a Microsoft Office Excel worksheet.
Public class MaskedTextBox Represents a Windows Forms MaskedTextBox that can be added to a Microsoft Office Excel worksheet.
Public class MonthCalendar Represents a Windows Forms MonthCalendar that can be added to a Microsoft Office Excel worksheet.
Public class NumericUpDown Represents a Windows Forms NumericUpDown that can be added to a Microsoft Office Excel worksheet.
Public class PictureBox Represents a Windows Forms PictureBox that can be added to a Microsoft Office Excel worksheet.
Public class ProgressBar Represents a Windows Forms ProgressBar that can be added to a Microsoft Office Excel worksheet.
Public class PropertyGrid Represents a Windows Forms PropertyGrid that can be added to a Microsoft Office Excel worksheet.
Public class RadioButton Represents a Windows Forms RadioButton that can be added to a Microsoft Office Excel worksheet.
Public class RichTextBox Represents a Windows Forms RichTextBox that can be added to a Microsoft Office Excel worksheet.
Public class TextBox Represents a Windows Forms TextBox that can be added to a Microsoft Office Excel worksheet.
Public class TrackBar Represents a Windows Forms TrackBar that can be added to a Microsoft Office Excel worksheet.
Public class TreeView Represents a Windows Forms TreeView that can be added to a Microsoft Office Excel worksheet.
Public class VScrollBar Represents a Windows Forms VScrollBar that can be added to a Microsoft Office Excel worksheet.
Public class WebBrowser Represents a Windows Forms WebBrowser that can be added to a Microsoft Office Excel worksheet.

See Also

Reference

Other Resources

Windows Forms Controls on Office Documents Overview

Limitations of Windows Forms Controls on Office Documents

Adding Controls to Office Documents at Run Time

How to: Add Windows Forms Controls to Office Documents