Export (0) Print
Expand All
Expand Minimize

XmlMappedRange.Value2 Property

Gets or sets the XmlMappedRange control value.

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

Object Value2 { get; set; }

Property Value

Type: System.Object
The value of the XmlMappedRange control.

The difference between this property and the Value property is that Value2 is not a parameterized property.

The following code example compares how the Text and Value properties differ for cells that contain formatted numbers. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void CompareTextAndValue2()
    this.CustomerAddress1Cell.Value2 = 1198.3;
    this.CustomerAddress1Cell.NumberFormat = "$#,##0";

    // Displays "1198.3".
    MessageBox.Show("The Value2 value is: " + 

    // Displays "$1,198".
    MessageBox.Show("The Text value is: " +

© 2015 Microsoft