Condividi tramite


WorkbookBase.Charts Property

Gets a Microsoft.Office.Interop.Excel.Sheets collection that represents all the chart sheets in the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property Charts As Sheets
public Sheets Charts { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Sheets
A Microsoft.Office.Interop.Excel.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 Sub PreviewCharts()
    If Me.Charts.Count > 0 Then 
        Me.Charts.PrintPreview(False)
    End If 
End Sub
private void PreviewCharts()
{
    if (this.Charts.Count > 0)
    {
        this.Charts.PrintPreview(false);
    }
}

.NET Framework Security

See Also

Reference

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace