Gets or sets a value that indicates whether the sheet is centered horizontally.
[Visual Basic] Property CenterHorizontally As Boolean [C#] bool CenterHorizontally { get; set; } [C++] __property bool get_CenterHorizontally(); __property void set_CenterHorizontally(bool ); [JScript] function get CenterHorizontally() : bool function set CenterHorizontally(bool);
True if the sheet is centered horizontally on the page when it's printed.
This example centers sheet one horizontally when it's printed.
[C#]
book.Worksheets[1].PageSetup.CenterHorizontally = true;
[Visual Basic]
book.Worksheets(1).PageSetup.CenterHorizontally = True
[C++]
book->Worksheets->Item[1]->PageSetup->CenterHorizontally = true;
IPageSetup Interface | NativeExcel Namespace | CenterVertically | PageSetup Property