XmlMappedRange.Text Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the text for the XmlMappedRange control.
public:
property System::Object ^ Text { System::Object ^ get(); };
public object Text { get; }
member this.Text : obj
Public ReadOnly Property Text As Object
Property Value
The text for the XmlMappedRange control.
Examples
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());
}
Private Sub CompareTextAndValue2()
Me.CustomerAddress1Cell.Value2 = 1198.3
Me.CustomerAddress1Cell.NumberFormat = "$#,##0"
' Displays "1198.3".
MsgBox("The Value2 value is: " & Me.CustomerAddress1Cell.Value2.ToString())
' Displays "$1,198".
MsgBox("The Text value is: " & Me.CustomerAddress1Cell.Text.ToString())
End Sub