Condividi tramite


Proprietà XmlMappedRange.Text (System 2007)

Aggiornamento: novembre 2007

Ottiene il testo per il controllo XmlMappedRange.

Spazio dei nomi:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Sintassi

<BrowsableAttribute(False)> _
Public ReadOnly Property Text As Object

Dim instance As XmlMappedRange
Dim value As Object

value = instance.Text
[BrowsableAttribute(false)]
public Object Text { get; }

Valore proprietà

Tipo: System.Object

Testo per il controllo XmlMappedRange.

Esempi

Nell'esempio di codice riportato di seguito viene confrontato il diverso comportamento delle proprietà Text e Value2 in relazione alle celle che contengono numeri formattati. Nell'esempio si presuppone che il foglio di lavoro corrente contenga un controllo XmlMappedRange denominato 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());
}

Autorizzazioni

Vedere anche

Riferimenti

XmlMappedRange Classe

Membri XmlMappedRange

Spazio dei nomi Microsoft.Office.Tools.Excel