Partager via


ChartSheet.BarShape, propriété

Obtient ou définit la forme utilisée avec le Microsoft.Office.Tools.Excel.ChartSheet de type histogramme ou graphique à barres 3D.

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
Property BarShape As XlBarShape
XlBarShape BarShape { get; set; }

Valeur de propriété

Type : Microsoft.Office.Interop.Excel.XlBarShape
Une des valeurs de XlBarShape.

Exemples

L'exemple de code suivant utilise la propriété BarShape du Microsoft.Office.Tools.Excel.ChartSheet actuel pour afficher les barres sous la forme de cylindres.

Private Sub SetBarShape()
    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.BarShape = Excel.XlBarShape.xlCylinder
End Sub
private void SetBarShape()
{
    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.BarShape = Excel.XlBarShape.xlCylinder;
}

Sécurité .NET Framework

Voir aussi

Référence

ChartSheet Interface

Microsoft.Office.Tools.Excel, espace de noms