Aracılığıyla paylaş


XmlMappedRange.Value2 Özellik

Alır veya ayarlar XmlMappedRange kontrol değer.

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

Sözdizimi

'Bildirim
Property Value2 As Object
Object Value2 { get; set; }

Özellik Değeri

Tür: System.Object
Değeri XmlMappedRange denetim.

Notlar

Bu özellik arasındaki farkı ve Value özelliği olan Value2 parametreli bir özellik değildir.

Örnekler

Aşağıdaki kod örnek karşılaştırır nasıl Text ve Value ö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ı