ExcelLocale1033Proxy Class (2007 System)

Provides methods that modify how a specified native Microsoft Office Excel object passes locale ID (LCID) information to the Excel object model.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
Public NotInheritable Class ExcelLocale1033Proxy
'Usage
You do not need to declare an instance of a static class in order to access its members.
public static class ExcelLocale1033Proxy
public ref class ExcelLocale1033Proxy abstract sealed
public final class ExcelLocale1033Proxy

Remarks

By default, Visual Studio Tools for Office solutions for Excel are not affected by the end user's locale settings, and always behave as though the locale is English (United States). This behavior is controlled by the ExcelLocale1033Attribute.

You can use the Unwrap and Wrap methods of the ExcelLocale1033Proxy class to modify this behavior for specific Excel objects (that is, for objects of types that are defined in the Microsoft.Office.Interop.Excel namespace). For more information, see Formatting Data in Excel with Various Regional Settings.

Excel 2003

For Excel 2003, there are some cases where native Excel objects do not work correctly while the ExcelLocale1033Attribute is true. The methods of the ExcelLocale1033Proxy class can be used to work around these limitations. For more information, see Formatting Data in Excel with Various Regional Settings.

Excel 2007

For Excel 2007, native Excel objects work as expected when the ExcelLocale1033Attribute is true. Therefore, the methods in the ExcelLocale1033Proxy class are obsolete in the version of the Visual Studio Tools for Office runtime that is used by Excel 2007 solutions (the Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime)). For more information about the Visual Studio Tools for Office runtime, see Visual Studio Tools for Office Runtime Overview.

Performance

Because the Visual Studio Tools for Office runtime wraps all native Excel objects in a proxy object when the ExcelLocale1033Attribute is true, you might notice a slowdown in certain operations that involve native Excel objects. In these cases, you can improve the performance by using the Unwrap method to get the Excel object without the proxy, and then perform the operation using that object. If you do this, be aware that the object returned by Unwrap uses the locale ID of the current thread, not locale ID 1033.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy

Thread Safety

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

See Also

Reference

ExcelLocale1033Proxy Members

Microsoft.Office.Tools.Excel Namespace

Other Resources

Formatting Data in Excel with Various Regional Settings

Globalization and Localization of Office Solutions