All docs
V21.2
21.2
21.1
The page you are viewing does not exist in version 21.1. This link will take you to the root page.
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

WorksheetThumbnailOptions Class

Contains options used to generate a thumbnail from a worksheet.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v21.2.Core.dll

Declaration

public class WorksheetThumbnailOptions :
    SheetThumbnailOptions

Remarks

Use the WorksheetExtensions.CreateThumbnail extension method of a Worksheet object to save a worksheet as an image. Create a WorksheetThumbnailOptions instance and pass it to this method to specify thumbnail options.

Important

The WorksheetExtensions class is defined in the DevExpress.Docs.v21.2.dll assembly. You need an active license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this assembly in production code.

The following example demonstrates how to save a worksheet as an image and set thumbnail options:

Create a thumbnail image of the worksheet

using DevExpress.Spreadsheet;
using System.Drawing;
// ...

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

    // Access an active worksheet.
    Worksheet worksheet = workbook.Worksheets.ActiveWorksheet;

    // Specify thumbnail options.
    var thumbnailOptions = new WorksheetThumbnailOptions
    {
        Resolution = 192,
        Scale = 80,
        Stretch = true,
        ColumnOffset = 1,
        RowOffset = 1,
        BackgroundColor = Color.FromArgb(0xF2, 0xF2, 0xF2)
    };

    // Create the worksheet's thumbnail and save it to a file.
    worksheet.CreateThumbnail("Worksheet_Thumbnail.png", ImageFileFormat.Png, 1600, 900, thumbnailOptions);
}

Inheritance

Object
SheetThumbnailOptions
WorksheetThumbnailOptions
See Also