Description
The PageSetup class represents the page layout properties of a printed worksheet.
C#
vb.net
Remarks
To return aPageSetup
object, use Worksheet.PageSetup.
Examples
C#
vb.net
Properties
Name |
Description |
---|---|
Sets or returns the value of the worksheet's bottom margin, in inches. This is the space between the worksheet data and the bottom edge of the printed page. This is set to 1 by default. The valid range of values is 0 through 100, and is also limited by the paper size. | |
The page PageSetup.CenterFooter could not be found. | |
The page PageSetup.CenterHeader could not be found. | |
Sets or returns whether or not the data of the worksheet is centered horizontally within the margins. This is is set to false by default. (This is not supported for charts.) |
|
Sets or returns whether or not the data of the worksheet is centered vertically within the margins. This is is set to false by default. (This is not supported for charts.) |
|
Sets or returns the first page number for the printed worksheet. By default, the first page number will be 1, or, if the print job does not start with page 1, this will be the number of the first page in the sequence of pages to print. Setting this property will set the FirstPageNumberAuto property to false. | |
Sets or returns whether Excel should determine the first page number for the printed worksheet. Setting the FirstPageNumber property will set this property to false. | |
Sets or returns FitToPagesTall. This is set to "auto" by default. The valid range of values is 0 through 32767. A value of 0 means "auto".
(This is not supported for charts.) |
|
Sets or returns FitToPagesWide. This is set to 1 by default. The valid range of values is 0 through 32767. A value of 0 means "auto".
(This is not supported for charts.) |
|
Sets or returns the value of the footer margin in inches. | |
Sets or returns the value of the header margin in inches. This is the space between the header data and the top edge of the printed page. This is set to 0.5 by default. The valid range of values is 0 through 100, and is also limited by paper size. | |
The page PageSetup.LeftFooter could not be found. | |
The page PageSetup.LeftHeader could not be found. | |
Sets or returns the value of the left margin in inches. This is the space between the worksheet data and the left edge of the printed page. This is set to 0.75 by default. The valid range of values is 0 through 100, and is also limited by paper size. | |
Sets or returns orientation of the printed worksheet. | |
Sets or returns the paper size that will be used when Excel renders and prints the worksheet. | |
Sets or returns the area of the worksheet that will be printed. Content outside of this area will not be printed. (This is not supported for charts.) |
|
Sets or returns whether Excel will print the worksheet in draft quality. This can be used to reduce printing time. When this is set to true , Excel does not print gridlines and most graphics. This is set to false by default. |
|
Sets or returns how cell errors will appear on the printed worksheet. (This is not supported for charts.) |
|
Sets or returns whether comments on the worksheet should be printed.
(This is not supported for charts.) |
|
Sets or returns whether comments will be printed at the end of the worksheet, or if they will be printed as they are displayed. If set to true , comments will be printed at the end.(This is not supported for charts.) |
|
Sets or returns whether the worksheet's horizontal and vertical cell gridlines will be printed. (This is not supported for charts.) |
|
Sets or returns whether the row and column headings will be printed for this worksheet. (This is not supported for charts.) |
|
Sets or returns whether a worksheet formatted with colors will be printed in black and white. Set this to true if you are printing a colored worksheet on a black and white printer, or to reduce printing time on a color printer. |
|
Sets or returns the order in which data is numbered and printed when it does not fit on one page. The default order is down-then-over. (This is not supported for charts.) |
|
Returns the Range of cells that contains the print titles. This range will contain up to two Area s, one for print title rows and another for the print title columns. These are the rows and columns that will be repeated on each printed page. (This is not supported for charts.) |
|
The page PageSetup.RightFooter could not be found. | |
The page PageSetup.RightHeader could not be found. | |
Sets or returns the value of the right margin in inches. This is the space between the worksheet data and the right edge of the printed page. This is set to.75 by default. The valid range of values is 0 through 100, and is also limited by paper size. | |
Sets or returns the value for the top margin in inches. This is the space between the worksheet data and the top edge of the printed page. This is set to 1 by default. The valid range of values are 0 through 100, and is also limited by paper size. | |
Sets or returns whether the Zoom property or the FitToPagesTall and FitToPagesWide pair of properties will be used. (This is not supported for charts.) |
|
Sets or returns the percentage by which the size of the printed worksheet is adjusted. The printed worksheet can be enlarged up to 400%, and reduced to 10%. (This is not supported for charts.) |
Methods
Name |
Description |
---|---|
Returns a section of the footer. | |
Returns a section of the header. | |
Sets the columns to use for the print titles. These are the columns that will be repeated on each page of a printed worksheet.
(This is not supported for charts.) |
|
Sets the rows to use for the print titles. These are the rows that will be repeated on each page of a printed worksheet.
(This is not supported for charts.) |
Nested Classes
Name |
Description |
---|---|
A CellErrorsAs value determines how cell errors will appear in the printed worksheet. | |
PageOrientation specifies the page orientation of the printed worksheet. | |
PagePaperSize specifies the paper size for printing. | |
PagePrintOrder specifies the order in which a worksheet should be printed. |