Export (0) Print
Expand All
Expand Minimize

XmlMappedRange.NumberFormatLocal Property (2007 System)

Gets or sets the format code for the XmlMappedRange control in the language of the user.

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

[BrowsableAttribute(false)]
public Object NumberFormatLocal { get; set; }

Property Value

Type: System.Object
The format code for the XmlMappedRange control in the language of the user.

The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

The following code example uses the NumberFormat property to format date strings in an XmlMappedRange. The example also uses the NumberFormatLocal property to display the date format in the language of the user. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerDateCell.

private void ApplyNumberFormatting()
{
    this.CustomerDateCell.Value2 = "4-Apr-1974";
    this.CustomerDateCell.NumberFormat = "m/d/yyyy";

    // Display the number format in the language of the user.
    MessageBox.Show("The number format for CustomerDateCell is: " +
        this.CustomerDateCell.NumberFormatLocal.ToString());
}

Community Additions

ADD
Show:
© 2014 Microsoft