Compartir a través de


XmlMappedRange.NumberFormatLocal Property

Definition

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

public:
 property System::Object ^ NumberFormatLocal { System::Object ^ get(); void set(System::Object ^ value); };
public object NumberFormatLocal { get; set; }
member this.NumberFormatLocal : obj with get, set
Public Property NumberFormatLocal As Object

Property Value

The format code for the XmlMappedRange control in the language of the user.

Examples

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());
}
Private Sub ApplyNumberFormatting()
    Me.CustomerDateCell.Value2 = "4-Apr-1974"
    Me.CustomerDateCell.NumberFormat = "m/d/yyyy"

    ' Display the number format in the language of the user.
    MsgBox("The number format for CustomerDateCell is: " & _
        Me.CustomerDateCell.NumberFormatLocal.ToString())
End Sub

Remarks

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

Applies to