NativeExcel2 for .Net Developer's Reference

IWorksheet.PageSetup Property

Returns an IPageSetup interface which contains all the page setup settings for the specified worksheet.

[Visual Basic]
PropertyReadOnlyPageSetupAsIPageSetup
[C#]
IPageSetupPageSetup{get;}
[C++]
__propertyIPageSetup*get_PageSetup();
[JScript]
functiongetPageSetup():IPageSetup

Property Value

IPageSetup interface.

Example

This example sets the center header text for the first worksheet.

[C#]
book.Worksheets[1].PageSetup.CenterHeader = "Monthly report"; 
[VisualBasic]
book.Worksheets(1).PageSetup.CenterHeader = "Monthly report"
[C++]
book->Worksheets->Item[1]->PageSetup->CenterHeader = S"Monthly report";

See Also

IWorksheet Interface | NativeExcel Namespace | IPageSetup Interface