Skip to main content
All docs
V24.2
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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.2.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