Skip to main content
A newer version of this page is available. .

XlPrintOptions.VerticalCentered Property

Gets or sets a value indicating whether worksheet data is centered vertically on a printed page.

Namespace: DevExpress.Export.Xl

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

Declaration

public bool VerticalCentered { get; set; }

Property Value

Type Description
Boolean

true, to center worksheet data; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to VerticalCentered
IXlSheet
.PrintOptions.VerticalCentered

Remarks

Use the VerticalCentered and XlPrintOptions.HorizontalCentered properties to center worksheet data on a printed page.

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/xl-export-api-examples-t253492

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