Aracılığıyla paylaş


XmlMappedRange.Text Özellik

Metni alır XmlMappedRange denetim.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Text As Object
Object Text { get; }

Özellik Değeri

Tür: System.Object
Metni XmlMappedRange denetim.

Örnekler

Aşağıdaki kod örnek karşılaştırır nasıl Text ve Value2 özellikleri, biçimlendirilen sayılar içeren hücreler için farklı.Bu kod örneği, geçerli çalışma sayfasının içerdiğini varsayar bir XmlMappedRange adlı CustomerLastNameCell.

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
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());
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

XmlMappedRange Arabirim

Microsoft.Office.Tools.Excel Ad Alanı