Condividi tramite


Proprietà XmlMappedRange.Creator

Ottiene un valore che indica l'applicazione nella quale è stato creato il controllo XmlMappedRange.

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

Sintassi

'Dichiarazione
ReadOnly Property Creator As XlCreator
    Get
XlCreator Creator { get; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Excel.XlCreator
Uno dei valori di XlCreator.

Note

Poiché il controllo XmlMappedRange è stato creato in Microsoft Office Excel, questa proprietà restituisce la stringa XCEL, che equivale al numero esadecimale 5843454C.

Esempi

Nell'esempio di codice riportato di seguito viene utilizzata la proprietà Creator per determinare se un controllo XmlMappedRange è stato creato in Microsoft Office Excel. Nell'esempio si presuppone che il foglio di lavoro corrente contenga un controllo XmlMappedRange denominato CustomerLastNameCell.

Private Sub DisplayCreator()
    If Me.CustomerLastNameCell.Creator = Excel.XlCreator.xlCreatorCode Then
        MsgBox("This XmlMappedRange was created in " & _
            "Microsoft Office Excel.")
    Else
        MsgBox("This XmlMappedRange was not created in " & _
            "Microsoft Office Excel.")
    End If
End Sub
private void DisplayCreator()
{
    if (this.CustomerLastNameCell.Creator == Excel.XlCreator.xlCreatorCode)
    {
        MessageBox.Show("This XmlMappedRange was created in " +
            "Microsoft Office Excel.");
    }
    else
    {
        MessageBox.Show("This XmlMappedRange was not created in " +
            "Microsoft Office Excel.");
    }
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

XmlMappedRange Interfaccia

Spazio dei nomi Microsoft.Office.Tools.Excel