Skip to main content
All docs
V24.1
Row

ChartSheetExtensions Class

Defines extension methods for the ChartSheet interface.

You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use these methods in production code.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Docs.v24.1.dll

NuGet Package: DevExpress.Document.Processor

Declaration

public static class ChartSheetExtensions

Remarks

To enable chart sheet extensions, add a reference to the DevExpress.Docs.v24.1.dll assembly and explicitly import the DevExpress.Spreadsheet namespace into the code with the using directive (Imports in Visual Basic).

You can call extension methods in the same way as instance methods of the ChartSheet object.

The example below shows how to use the CreateThumbnail extension method to save a chart sheet as an image.

Generate a Thumbnail from the Chart Sheet

using DevExpress.Spreadsheet;
// ...

// Create a new Workbook object.
using (Workbook workbook = new Workbook())
{
    // Load a workbook from a file.
    workbook.LoadDocument("VariableCosts.xlsx", DocumentFormat.Xlsx);

    // Access an active chart sheet.
    ChartSheet chartSheet = workbook.ChartSheets.ActiveChartSheet;

    // Save the chart sheet as an image.
    chartSheet.CreateThumbnail(920, 670).NativeImage.Save("Chart_sheet_Thumbnail.png");
}

Inheritance

Object
ChartSheetExtensions
See Also