Skip to main content

IXlSheet.PrintOptions Property

Gets or sets specific options that control how a worksheet is printed.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v22.2.Core.dll

NuGet Packages: DevExpress.Printing.Core, DevExpress.Win.Dashboard.Design


XlPrintOptions PrintOptions { get; set; }

Property Value

Type Description

An XlPrintOptions object that contains worksheet print options.


Use the PrintOptions property to specify print options for a worksheet. The XlPrintOptions object enables you to include gridlines and column and row headings in the printout (XlPrintOptions.GridLines and XlPrintOptions.Headings), and center worksheet data on a page (XlPrintOptions.HorizontalCentered and XlPrintOptions.VerticalCentered). To specify formatting options for a printed page (orientation, size, scale, print quality etc.), use the IXlSheet.PageSetup property.

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


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