NativeExcel2 for .Net Developer's Reference

IPageSetup.CenterVertically Property

Gets or sets a value that indicates whether the sheet is centered vertically.

[Visual Basic]
PropertyCenterVerticallyAsBoolean
[C#]
boolCenterVertically{get;set;}
[C++]
__propertyboolget_CenterVertically();
__propertyvoidset_CenterVertically(bool);
[JScript]
functiongetCenterVertically():bool
functionsetCenterVertically(bool);

Property Value

True if the sheet is centered vertically on the page when it's printed.

Example

This example centers sheet one vertically when it's printed.

[C#]
book.Worksheets[1].PageSetup.CenterVertically = true;
[VisualBasic]
book.Worksheets(1).PageSetup.CenterVertically = True
[C++]
book->Worksheets->Item[1]->PageSetup->CenterVertically = true;

See Also

IPageSetup Interface | NativeExcel Namespace | CenterHorizontally | PageSetup Property