Partager via


ChartSheet.Application, propriété

Obtient un Application qui représente l'application Microsoft Office Excel.

Espace de noms :  Microsoft.Office.Tools.Excel
Assemblys :   Microsoft.Office.Tools.Excel.v4.0.Utilities (dans Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
  Microsoft.Office.Tools.Excel (dans Microsoft.Office.Tools.Excel.dll)

Syntaxe

'Déclaration
ReadOnly Property Application As Application
Application Application { get; }

Valeur de propriété

Type : Microsoft.Office.Interop.Excel.Application
Application qui représente l'application Microsoft Office Excel.

Exemples

L'exemple de code suivant utilise la propriété Application du Microsoft.Office.Tools.Excel.ChartSheet actuel pour afficher le nom de l'application dans un message.

Private Sub DisplayApplicationName()
    Globals.Sheet1.Range("A1", "A5").Value2 = 22
    Globals.Sheet1.Range("B1", "B5").Value2 = 55

    Me.SetSourceData(Globals.Sheet1.Range("A1", "B5"), _
        Excel.XlRowCol.xlColumns)
    Me.ChartType = Excel.XlChartType.xl3DBarClustered
    MsgBox("The current application is " & Me.Application.Name)
End Sub
private void DisplayApplicationName()
{
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.SetSourceData(Globals.Sheet1.Range["A1", "B5"],
        Excel.XlRowCol.xlColumns);
    this.ChartType = Excel.XlChartType.xl3DBarClustered;

    MessageBox.Show("The current application is " + 
        this.Application.Name);
}

Sécurité .NET Framework

Voir aussi

Référence

ChartSheet Interface

Microsoft.Office.Tools.Excel, espace de noms