Skip to main content

XlPrintOptions.Headings Property

Gets or sets a value indicating whether row and column headings should be printed.

Namespace: DevExpress.Export.Xl

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

NuGet Package: DevExpress.Printing.Core

Declaration

public bool Headings { get; set; }

Property Value

Type Description
Boolean

true, to print row and column headings; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to Headings
IXlSheet
.PrintOptions .Headings

Remarks

Use the Headings property to specify whether or not to include row and column headings in the worksheet printout. To control the visibility of headers in the worksheet view, use the IXlSheetViewOptions.ShowRowColumnHeaders property of the object accessible from the IXlSheet.ViewOptions property.

To learn more about how to specify various print-related options, refer to the How to: Specify Print Settings example.

Example

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

Note

A complete sample project is available at https://github.com/DevExpress-Examples/excel-export-api-examples

// 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