Factory.GetVstoObject Method (_Worksheet)
Returns a Microsoft.Office.Tools.Excel.Worksheet host item that extends the functionality of the specified native workbook object.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Function GetVstoObject ( _
worksheet As _Worksheet _
) As Worksheet
Worksheet GetVstoObject(
_Worksheet worksheet
)
Parameters
- worksheet
Type: Microsoft.Office.Interop.Excel._Worksheet
The native worksheet object for which to retrieve the extended object. Although this parameter is of type Microsoft.Office.Interop.Excel._Worksheet, you typically pass a Microsoft.Office.Interop.Excel.Worksheet object to this method.
Return Value
Type: Microsoft.Office.Tools.Excel.Worksheet
The host item that extends the functionality of the native worksheet object, if the native worksheet is the underlying object of a Microsoft.Office.Tools.Excel.Worksheet object in the current document-level customization; otherwise, nulla null reference (Nothing in Visual Basic).
Remarks
In a document-level customization, you cannot use this method to generate a new extended Microsoft.Office.Tools.Excel.Worksheet object for a native worksheet object. You can use this method only to get a Microsoft.Office.Tools.Excel.Worksheet object that is in the current customization. For more information, see Getting Extended Objects from Native Office Objects in Document-Level Customizations.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.