Skip to main content

XlPrintOptions Class

Represents the object that specifies printing options for a worksheet.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core


public class XlPrintOptions

The following members return XlPrintOptions objects:


To specify print options for a worksheet, set the IXlSheet.PrintOptions property to an instance of the XlPrintOptions class. Utilize the XlPrintOptions object’s XlPrintOptions.GridLines and XlPrintOptions.Headings properties to include gridlines and column and row headings in the printout. To center worksheet data on a page, use the XlPrintOptions.HorizontalCentered and XlPrintOptions.VerticalCentered properties.

For more information on how to adjust print options, refer to the How to: Specify Print Settings example.


The example below demonstrates how to specify print settings for a worksheet.


A complete sample project is available at

// Specify print options for the worksheet.
sheet.PrintOptions = new XlPrintOptions();
// Print row and column headings.
sheet.PrintOptions.Headings = true;
// Print gridlines.
sheet.PrintOptions.GridLines = true;
// Center worksheet data on a printed page.
sheet.PrintOptions.HorizontalCentered = true;
sheet.PrintOptions.VerticalCentered = true;


See Also