Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Spreadsheet Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Table Overview
   [Expand]Charting Overview
   [Expand]Mail Merge Overview
    Find and Replace
   [Collapse]Visual Elements
    [Expand]Cells and Cell Ranges
     Rows and Columns
     Name Box
     Pop-Up Menus
      Format Cells Dialog
      Paste Special Dialog
      Edit Hyperlink Dialog
      Symbol Dialog
      Create Table Dialog
      Change Chart Type Dialog
      Find and Replace Dialog
      Encrypt Document Dialog
      Password Dialog
      Protect Workbook Dialog
      Protect Sheet Dialog
      User Permissions Dialog
      Insert Function Dialog
      Function Arguments Dialog
      Name Manager
      New Name Dialog
      Create Names from Selection Dialog
      Subtotal Dialog
      Data Validation Dialog
      Properties Dialog
      Page Setup Dialog
      Header and Footer Dialog
      Create PivotTable Dialog
      Move PivotTable Dialog
      Change PivotTable Data Source Dialog
      PivotTable Field List
      PivotTable Field Settings Dialog
      PivotTable Value Field Settings Dialog
      PivotTable Sort Dialog
      Insert Calculated Field Dialog
      Insert Calculated Item Dialog
      PivotTable Solve Order Dialog
      PivotTable Options Dialog
      New Formatting Rule Dialog
      Conditional Formatting Rules Manager
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Page Setup Dialog

The Page Setup dialog allows end-users to specify the page orientation, paper size, margins, printout options, and it allows them to add headers and footers to a worksheet.

End-users can invoke the Page Setup dialog by clicking the dialog box launcher located in the bottom-right corner of the Page Setup group on the Page Layout tab of the ribbon UI. For an example on how to create a ribbon UI and add the Page Setup page group to the SpreadsheetControl, refer to the Getting Started topic.

The Page Setup dialog includes the following tabs.

  • Page

    Options under the Page tab enable end-users to set page orientation (WorksheetView.Orientation), scaling options (WorksheetPrintOptions.Scale, WorksheetPrintOptions.FitToWidth and WorksheetPrintOptions.FitToHeight), paper size (WorksheetView.PaperKind), printing DPI and the starting page number (WorksheetPageNumbering.Start).

  • Margins

    This tab allows end-users to set page margins, which determine the space between the document content and page edges. To specify margins in code, use the WorksheetView.Margins property.

    End-users can center worksheet data on a printed page by selecting the Horizontally (WorksheetPrintOptions.CenterHorizontally) and Vertically (WorksheetPrintOptions.CenterVertically) check boxes.

  • Header/Footer

    Using this tab, end-users can add headers and footers to a worksheet printout. They can select one of the predefined options in the Header or Footer drop-down list, or specify custom headers and footers using the Header and Footer dialog, which can be invoked by clicking the Custom Header/Footer... button. To get access to the worksheet header and footer in code, use the Worksheet.HeaderFooterOptions property.

    This tab also allows end-users to specify a number of settings affecting both headers and footers.

  • Sheet

    The Sheet tab allows end-users to specify the following high-powered printout options.

    • Print area (Worksheet.SetPrintRange)

      In the Print area box, an end-user can type a cell range to be printed.

    • Print titles (WorksheetPrintOptions.PrintTitles)

      This group of settings allows an end-user to specify rows and columns to be repeated on every printed page.

    • Gridlines (WorksheetPrintOptions.PrintGridlines)

      An end-user can select this check box to display worksheet gridlines on a printed page.

    • Draft quality

      An end-user can select this check box to print a worksheet without graphics (this is useful when it is necessary to accelerate printing and save toner).

    • Row and column headings (WorksheetPrintOptions.PrintHeadings)

      An end-user can select this check box to include row and column headings into a worksheet printout.

    • Comments (WorksheetPrintOptions.CommentsPrintMode)

      In the Comments box, end-users can select one of the built-in options to specify how to print comments attached to worksheet cells. They can either omit comments on printing, print them as they are displayed on the worksheet, or append them to a separate page at the end of a worksheet printout.

    • Cell errors as (WorksheetPrintOptions.ErrorsPrintMode)

      In this box, end-users can select how to print formula errors contained in worksheet cells. They can print errors as they are displayed on the worksheet, replace them with blank values, display errors as two dashes (--), or print the error code #N/A in the corresponding cells.

    • Page order (WorksheetPrintOptions.PageOrder)

      An end-user can click Down, then over or Over, then down to specify whether worksheet pages should be numbered and printed from the top down and then left to right (PageOrder.DownThenOver) or from left to right and then from the top down (PageOrder.OverThenDown).

An end-user can click the Print button located at the bottom of each tab to send the worksheet to a printer, or invoke the Print Preview window to view a worksheet before printing by clicking the Print Preview button.

For examples on how to specify print settings for a worksheet in code, refer to the Printing section.

How would you rate this topic?​​​​​​​