Compartilhar via


WorkbookBase.Charts Property

Definition

Gets a Sheets collection that represents all the chart sheets in the workbook.

public:
 property Microsoft::Office::Interop::Excel::Sheets ^ Charts { Microsoft::Office::Interop::Excel::Sheets ^ get(); };
public Microsoft.Office.Interop.Excel.Sheets Charts { get; }
member this.Charts : Microsoft.Office.Interop.Excel.Sheets
Public ReadOnly Property Charts As Sheets

Property Value

A Sheets collection that represents all the chart sheets in the workbook.

Examples

The following code example uses the Charts property to generate a print preview of all the chart sheets in the current workbook.

This example is for a document-level customization.

private void PreviewCharts()
{
    if (this.Charts.Count > 0)
    {
        this.Charts.PrintPreview(false);
    }
}
Private Sub PreviewCharts()
    If Me.Charts.Count > 0 Then
        Me.Charts.PrintPreview(False)
    End If
End Sub

Applies to