ChartSheetBase.Shapes Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém um objeto Shapes que representa todas as formas no ChartSheetBase.
public Microsoft.Office.Interop.Excel.Shapes Shapes { get; }
Valor da propriedade
Um objeto Shapes que representa todas as formas no ChartSheetBase.
Exemplos
O exemplo de código a seguir usa a Shapes propriedade para desenhar uma forma de rosca no atual Microsoft.Office.Tools.Excel.ChartSheetBase .
private void AddDonutToChartSheet()
{
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.Shapes.AddShape(Office.MsoAutoShapeType.msoShapeDonut,
50, 50, 50, 50);
}
Private Sub AddDonutToChartSheet()
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.Shapes.AddShape(Office.MsoAutoShapeType.msoShapeDonut, _
50, 50, 50, 50)
End Sub