The PageSetup class represents the page layout properties of a printed worksheet.

 public class PageSetup
Public Class PageSetup

To return a PageSetup object, use Worksheet.PageSetup.


          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          PageSetup ps = wb.Worksheets[0].PageSetup;
        

          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim ps As PageSetup = wb.Worksheets(0).PageSetup
        

Name

Description

Notes

BottomMargin

 

CenterFooter

 

CenterHeader

 

CenterHorizontally

Unsupported for charts

CenterVertically

Unsupported for charts

FirstPageNumber

 

FirstPageNumberAuto

 

FitToPagesTall

Unsupported for charts

FitToPagesWide

Unsupported for charts

FooterMargin

 

HeaderMargin

 

LeftFooter

 

LeftHeader

 

LeftMargin

 

Orientation

 

PaperSize

 

PrintArea

Unsupported for charts

PrintAsDraft

 

PrintCellErrorsAs

Unsupported for charts

PrintComments

Unsupported for charts

PrintCommentsAtEnd

Unsupported for charts

PrintGridlines

Unsupported for charts

PrintHeadings

Unsupported for charts

PrintInBlackAndWhite

 

PrintOrder

Unsupported for charts

PrintTitles

Unsupported for charts

RightFooter

 

RightHeader

 

RightMargin

 

TopMargin

 

UseZoom

Unsupported for charts

Zoom

Unsupported for charts

Name

Description

Notes

GetFooter(HeaderFooterSection.Section)

 

GetHeader(HeaderFooterSection.Section)

 

SetPrintTitleColumns(Int32, Int32)

Unsupported for charts

SetPrintTitleRows(Int32, Int32)

Unsupported for charts

Name

Description

CellErrorsAs

PageOrientation

PagePaperSize

PagePrintOrder