Partager via


ChartSheetBase.Name, propriété

Obtient ou définit le nom de Microsoft.Office.Tools.Excel.ChartSheetBase.

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

Syntaxe

'Déclaration
Public Property Name As String
    Get
    Set
public string Name { get; set; }

Valeur de propriété

Type : System.String
Nom de Microsoft.Office.Tools.Excel.ChartSheetBase.

Exemples

L'exemple de code suivant utilise la propriété Name pour définir "WidgetSales" comme nom du Microsoft.Office.Tools.Excel.ChartSheetBase actuel.

Private Sub SetName()
    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
    Me.Name = "WidgetSales"
End Sub
private void SetName()
{
    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; 

    this.Name = "WidgetSales";
}

Sécurité .NET Framework

Voir aussi

Référence

ChartSheetBase Classe

Microsoft.Office.Tools.Excel, espace de noms