Export (0) Print
Expand All
Expand Minimize

Worksheet.InnerObject Property

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

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public Worksheet InnerObject { get; }

Property Value

A Microsoft.Office.Interop.Excel.Worksheet that represents the underlying native object for the Worksheet.

If the ExcelLocale1033Attribute attribute is set to false, methods and properties in Excel that expect a Microsoft.Office.Interop.Excel.Worksheet passed as an Object will throw an InvalidCastException if you pass in a Worksheet. In this case, you can use the InnerObject property to pass the underlying native object to these methods and properties.

The InnerObject property returns a Microsoft.Office.Interop.Excel.Worksheet that passes the locale ID (LCID) 1033 (English, United States) to Microsoft Office Excel for all locale-sensitive calls to the Excel object model if the ExcelLocale1033Attribute attribute is set to true. To get a Microsoft.Office.Interop.Excel.Worksheet that passes the locale ID (LCID) of the current thread to Microsoft Office Excel, use the static Unwrap method of the ExcelLocale1033Proxy class. For more information about localization issues in Excel, see Data in Excel with Various Locales.

Show:
© 2014 Microsoft