Export (0) Print
Expand All
Expand Minimize

XmlMappedRange.Text Property (2007 System)

Gets the text for the XmlMappedRange control.

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

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

Property Value

Type: System.Object
The text for the XmlMappedRange control.

The following code example compares how the Text and Value2 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: " + 
        this.CustomerAddress1Cell.Value2.ToString());

    // Displays "$1,198".
    MessageBox.Show("The Text value is: " +
        this.CustomerAddress1Cell.Text.ToString());
}

Community Additions

ADD
Show:
© 2014 Microsoft