WorksheetBase Class

 

Provides the base class for the Sheetn classes in document-level projects for Microsoft Office Excel.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

System.Object
  Microsoft.Office.Tools.Excel.WorksheetBase

[ToolboxItemAttribute(false)]
public abstract class WorksheetBase : IWorksheetExtension, IExtension, 
	EntryPoint, ISupportInitialize, IBindableComponent, IComponent, 
	IDisposable

NameDescription
System_CAPS_protmethodWorksheetBase(Factory, IServiceProvider, String, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

NameDescription
System_CAPS_pubpropertyApplication

Gets a Microsoft.Office.Interop.Excel.Application object that represents the Microsoft Office Excel application.

System_CAPS_pubpropertyAutoFilter

Gets a Microsoft.Office.Interop.Excel.AutoFilter that provides information about filtered lists on the worksheet if filtering is enabled. Gets null if filtering is off.

System_CAPS_pubpropertyAutoFilterMode

Gets or sets a value that indicates whether filtering is currently enabled on the worksheet (that is, whether the filter drop-down arrows are currently displayed).

System_CAPS_pubpropertyBase

Gets the Worksheet object that this WorksheetBase object extends.

System_CAPS_pubpropertyBindingContext

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubpropertyCells

Gets a Range object that represents all the cells on the worksheet (not just the cells that are currently in use).

System_CAPS_pubpropertyCircularReference

Gets a Range object that represents the range containing the first circular reference on the sheet, or gets null if there is no circular reference on the sheet.

System_CAPS_pubpropertyColumns

Gets a Range object that represents one or more columns on the worksheet.

System_CAPS_pubpropertyComments

Gets a Microsoft.Office.Interop.Excel.Comments collection that represents all the comments for the worksheet.

System_CAPS_pubpropertyConsolidationFunction

Gets the function code used for the current consolidation.

System_CAPS_pubpropertyConsolidationOptions

Gets a three-element Array of consolidation options.

System_CAPS_pubpropertyConsolidationSources

Gets an Array of strings that name the source sheets and ranges for the worksheet's current consolidation.

System_CAPS_pubpropertyControls

Gets the collection of managed controls that are contained on the worksheet.

System_CAPS_pubpropertyCreator

Gets a value that indicates the application in which the worksheet was created.

System_CAPS_pubpropertyCustomProperties

Gets a Microsoft.Office.Interop.Excel.CustomProperties object representing the identifier information associated with a worksheet.

System_CAPS_pubpropertyDataBindings

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubpropertyDataHost

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubpropertyDisplayPageBreaks

Gets or sets a value that indicates whether page breaks (both automatic and manual) on the worksheet are displayed.

System_CAPS_pubpropertyDisplayRightToLeft

Gets or sets a value that indicates whether the worksheet is displayed from right to left instead of from left to right.

System_CAPS_pubpropertyEnableAutoFilter

Gets or sets a value that indicates whether AutoFilter arrows are enabled when user-interface-only protection is turned on.

System_CAPS_pubpropertyEnableCalculation

Gets or set a value that indicates whether Microsoft Office Excel automatically recalculates the worksheet when necessary.

System_CAPS_pubpropertyEnableFormatConditionsCalculation

Gets or sets a value that determines whether conditional formats will occur automatically.

System_CAPS_pubpropertyEnableOutlining

Gets or sets a value that indicates whether outlining symbols are enabled when user-interface-only protection is turned on.

This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010.

.

This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010.

.

System_CAPS_pubpropertyEnablePivotTable

Gets or sets a value that indicates whether PivotTable controls and actions are enabled when user-interface-only protection is turned on.

System_CAPS_pubpropertyEnableSelection

Gets or sets a value indicating which cells can be selected on the sheet.

System_CAPS_pubpropertyFilterMode

Gets a value that indicates whether the worksheet is actively filtering data.

System_CAPS_pubpropertyHostContext

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubpropertyHPageBreaks

Gets an Microsoft.Office.Interop.Excel.HPageBreaks collection that represents the horizontal page breaks on the sheet.

System_CAPS_pubpropertyHyperlinks

Gets a Microsoft.Office.Interop.Excel.Hyperlinks collection that represents the hyperlinks for the range or worksheet.

System_CAPS_pubpropertyIndex

Gets the index number of the worksheet within the collection of worksheets.

System_CAPS_pubpropertyInnerObject

Gets a Microsoft.Office.Interop.Excel.Worksheet that represents the underlying native object for the WorksheetBase.

System_CAPS_pubpropertyItemProvider

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubpropertyListObjects

Gets a collection of Microsoft.Office.Interop.Excel.ListObject objects in the worksheet.

System_CAPS_pubpropertyMailEnvelope

Gets an e-mail header for the worksheet.

System_CAPS_pubpropertyName

Gets or sets the name of the worksheet.

System_CAPS_pubpropertyNames

Gets a Microsoft.Office.Interop.Excel.Names collection that represents all the worksheet-specific names (names defined with the "WorksheetName!" prefix).

System_CAPS_pubpropertyNext

Gets a Microsoft.Office.Interop.Excel.Worksheet that represents the next sheet.

System_CAPS_pubpropertyOutline

Gets an Microsoft.Office.Interop.Excel.Outline that represents the outline for the worksheet.

System_CAPS_pubpropertyPageSetup

Gets a Microsoft.Office.Interop.Excel.PageSetup that contains all the page setup settings for the worksheet.

System_CAPS_pubpropertyParent

Gets the parent object for the worksheet.

System_CAPS_pubpropertyPrevious

Gets a Microsoft.Office.Interop.Excel.Worksheet that represents the previous sheet.

System_CAPS_pubpropertyPrintedCommentPages

Gets the number of comment pages that will be printed for the current worksheet. This property can be used only in Excel 2010 projects.

System_CAPS_pubpropertyProtectContents

Gets a value that indicates whether the contents of the worksheet (the individual cells) are protected.

System_CAPS_pubpropertyProtectDrawingObjects

Gets a value that indicates whether shapes are protected.

System_CAPS_pubpropertyProtection

Gets a Microsoft.Office.Interop.Excel.Protection object that represents the protection options of the worksheet.

System_CAPS_pubpropertyProtectionMode

Gets a value that indicates whether user interface-only protection is turned on.

System_CAPS_pubpropertyProtectScenarios

Gets a value that indicates whether worksheet scenarios are protected.

System_CAPS_pubpropertyQueryTables

Gets the Microsoft.Office.Interop.Excel.QueryTables collection that represents all the query tables on the worksheet.

System_CAPS_pubpropertyRange

Gets a Microsoft.Office.Interop.Excel.Range object that represents a cell or a range of cells.

System_CAPS_pubpropertyRows

Gets a Range object that represents one or more rows on the worksheet.

System_CAPS_pubpropertyScrollArea

Gets or sets the range where scrolling is allowed, as an A1-style range reference.

System_CAPS_pubpropertyShapes

Gets a Microsoft.Office.Interop.Excel.Shapes object that represents all the shapes on the worksheet.

System_CAPS_pubpropertySite

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubpropertySort

Gets the sorted values in the current worksheet.

System_CAPS_pubpropertyStandardHeight

Gets the standard (default) height of all the rows in the worksheet, in points.

System_CAPS_pubpropertyStandardWidth

Gets or sets the standard (default) width of all the columns in the worksheet.

System_CAPS_pubpropertyTab

Gets a Microsoft.Office.Interop.Excel.Tab for the worksheet.

System_CAPS_pubpropertyTag

Gets or sets the object that contains data about the worksheet.

System_CAPS_pubpropertyTransitionExpEval

Gets or sets a value that indicates whether Microsoft Office Excel uses Lotus 1-2-3 expression evaluation rules for the worksheet.

System_CAPS_pubpropertyTransitionFormEntry

Gets or sets a value that indicates whether Microsoft Office Excel uses Lotus 1-2-3 formula entry rules for the worksheet.

System_CAPS_pubpropertyType

Gets the worksheet type.

System_CAPS_pubpropertyUsedRange

Gets a Microsoft.Office.Interop.Excel.Range object that represents all the cells that have contained a value at any time.

System_CAPS_pubpropertyVisible

Gets or sets a Microsoft.Office.Interop.Excel.XlSheetVisibility value that determines whether the object is visible.

System_CAPS_pubpropertyVPageBreaks

Gets a Microsoft.Office.Interop.Excel.VPageBreaks collection that represents the vertical page breaks on the sheet.

NameDescription
System_CAPS_pubmethodActivate()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodBeginInit()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodCalculateMethod()

Calculates the formulas in the worksheet.

System_CAPS_pubmethodChartObjects(Object)

Gets an object that represents either a single embedded chart (a T:Microsoft.Office.Interop.Excel.ChartObject) or a collection of all the embedded charts (a T:Microsoft.Office.Interop.Excel.ChartObjects) on the worksheet.

System_CAPS_pubmethodCheckSpelling(Object, Object, Object, Object)

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodCircleInvalid()

Circles invalid entries on the worksheet.

System_CAPS_pubmethodClearArrows()

Clears the tracer arrows from the worksheet. Tracer arrows are added by using the auditing feature.

System_CAPS_pubmethodClearCircles()

Clears circles from invalid entries on the worksheet.

System_CAPS_pubmethodCopy(Object, Object)

Copies the worksheet to another location in the workbook.

System_CAPS_pubmethodDelete()

Deletes the underlying Microsoft.Office.Interop.Excel.Worksheet object, but does not delete the host item. It is highly recommended that this method not be used.

System_CAPS_pubmethodDispose()

Releases all resources used by the current instance of the WorksheetBase class.

System_CAPS_pubmethodEndInit()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodEvaluate(Object)

Converts a Microsoft Office Excel name to an object or a value.

System_CAPS_pubmethodExportAsFixedFormat(XlFixedFormatType, Object, Object, Object, Object, Object, Object, Object, Object)

Exports to a file of the specified format.

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_protmethodFinishInitialization()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_protmethodGetAutomationObject()

Called by the Visual Studio Tools for Office runtime to get an object that can be used by VBA code in the worksheet.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodInitialize()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_protmethodInitializeDataBindings()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodMove(Object, Object)

Moves the worksheet to another location in the workbook.

System_CAPS_pubmethodOLEObjects(Object)

Gets an object that represents either a single OLE object (an T:Microsoft.Office.Interop.Excel.OLEObject) or a collection of all OLE objects (an T:Microsoft.Office.Interop.Excel.OLEObjects collection) on the worksheet.

System_CAPS_protmethodOnShutdown()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_protmethodOnStartup()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubmethodPaste(Object, Object)

Pastes the contents of the Clipboard onto the worksheet.

System_CAPS_pubmethodPasteSpecial(Object, Object, Object, Object, Object, Object, Object)

Pastes the contents of the Clipboard onto the worksheet, using a specified format. Use this method to paste data from other applications or to paste data in a specific format.

System_CAPS_pubmethodPivotTables(Object)

Gets an object that represents either a single PivotTable report (a Microsoft.Office.Interop.Excel.PivotTable object) or a collection of all the PivotTable reports (a T:Microsoft.Office.Interop.Excel.PivotTables object) on a worksheet.

System_CAPS_pubmethodPivotTableWizard(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)
System_CAPS_pubmethodPrintOutEx(Object, Object, Object, Object, Object, Object, Object, Object, Object)

Prints the worksheet.

System_CAPS_pubmethodPrintPreview(Object)

Shows a preview of the worksheet as it would look when printed.

System_CAPS_pubmethodProtect(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Protects a worksheet so that it cannot be modified.

System_CAPS_pubmethodResetAllPageBreaks()

Resets all page breaks on the specified worksheet.

System_CAPS_pubmethodSaveAs(String, Object, Object, Object, Object, Object, Object, Object, Object, Object)

Saves changes to the worksheet in a different file.

System_CAPS_pubmethodScenarios(Object)

Gets an object that represents either a single scenario (a T:Microsoft.Office.Interop.Excel.Scenario object) or a collection of scenarios (a T:Microsoft.Office.Interop.Excel.Scenarios object) on the worksheet.

System_CAPS_pubmethodSelect(Object)

Selects the worksheet.

System_CAPS_pubmethodSetBackgroundPicture(String)

Sets the background graphic for the worksheet.

System_CAPS_pubmethodShowAllData()

Makes all rows of the currently filtered list visible. If AutoFilter is in use, this method changes the arrows to "All."

System_CAPS_pubmethodShowDataForm()

Displays the data form associated with the worksheet.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUnprotect(Object)

Removes protection from the worksheet. This method has no effect if the worksheet is not protected.

System_CAPS_pubmethodXmlDataQuery(String, Object, Object)

Gets a Range object that represents the cells mapped to a particular XPath. Gets null if the specified XPath has not been mapped to the worksheet, or if the mapped range is empty.

System_CAPS_pubmethodXmlMapQuery(String, Object, Object)

Gets a Range object that represents the cells mapped to a particular XPath. Gets null if the specified XPath has not been mapped to the worksheet.

NameDescription
System_CAPS_pubeventActivateEvent

Occurs when the worksheet is activated.

System_CAPS_pubeventBeforeDoubleClick

Occurs when the worksheet is double-clicked, before the default double-click action.

System_CAPS_pubeventBeforeRightClick

Occurs when the worksheet is right-clicked, before the default right-click action.

System_CAPS_pubeventBindingContextChanged

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubeventCalculate

Occurs after the worksheet is recalculated.

System_CAPS_pubeventChange

Occurs when something changes in the WorksheetBase cells.

System_CAPS_pubeventDeactivate

Occurs when the worksheet loses focus.

System_CAPS_pubeventDisposed

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubeventFollowHyperlink

Occurs when you click any hyperlink on a worksheet.

System_CAPS_pubeventPivotTableAfterValueChange

Occurs after a cell or range of cells inside a PivotTable are edited or recalculated (for cells that contain formulas). This event can be used only in Excel 2010 projects.

System_CAPS_pubeventPivotTableBeforeAllocateChanges

Occurs before changes are applied to a PivotTable. This event can be used only in Excel 2010 projects.

System_CAPS_pubeventPivotTableBeforeCommitChanges

Occurs before changes are committed against the OLAP data source for a PivotTable. This event can be used only in Excel 2010 projects.

System_CAPS_pubeventPivotTableBeforeDiscardChanges

Occurs before changes to a PivotTable are discarded. This event can be used only in Excel 2010 projects.

System_CAPS_pubeventPivotTableChangeSync

Occurs after changes to a PivotTable. This event can be used only in Excel 2010 projects.

System_CAPS_pubeventPivotTableUpdate

Occurs after a PivotTable report is updated on a worksheet.

System_CAPS_pubeventSelectionChange

Occurs when the selection changes on a worksheet.

System_CAPS_pubeventShutdown

Occurs when the worksheet host item shuts down.

System_CAPS_pubeventStartup

This API supports the product infrastructure and is not intended to be used directly from your code.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodEntryPoint.BeginInit()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodEntryPoint.EndInit()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodEntryPoint.FinishInitialization()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodEntryPoint.Initialize()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodEntryPoint.InitializeDataBindings()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodEntryPoint.OnShutdown()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodEntryPoint.OnStartup()

This API supports the product infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIWorksheetExtension.GetAutomationObject()

This API supports the product infrastructure and is not intended to be used directly from your code.

The WorksheetBase class is the base class for the Sheetn classes in document-level Excel projects created by using Visual Studio. Use the Sheetn classes to programmatically access the worksheets in your project. The WorksheetBase class is a host item that represents a worksheet in document-level projects. For more information, see Host Items and Host Controls Overview and Worksheet Host Item.

The WorksheetBase class provides the same members as the Microsoft.Office.Interop.Excel.Worksheet class in the Excel primary interop assembly, but it adds the following features:

You cannot create WorksheetBase objects programmatically in Office projects.

In document-level projects, the Sheetn classes (which derive from WorksheetBase) are instantiated automatically by the Visual Studio Tools for Office runtime when the end user opens the workbook. For more information, see Programming Document-Level Customizations.

In application-level projects, you can create worksheet host items programmatically by using the GetVstoObject method. The worksheet host item you create is a Microsoft.Office.Tools.Excel.Worksheet object, rather than a WorksheetBase object. For more information, see Extending Word Documents and Excel Workbooks in VSTO Add-ins at Run Time.

This type is used only in Office projects that target the .NET Framework 4 or later. The assembly that defines this type is not part of the Visual Studio Tools for Office runtime. You must deploy this assembly with your solution. For more information, see Assemblies in the Visual Studio Tools for Office Runtime.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: