# Printing

Printing in **RadSpreadsheet** allows you to prepare and display spreadsheet data the most suitable way depending on your needs. Using different printing options such as defining the print page, the scale factor or whether to print grid-lines you may customize the way to present your data. Additionally **Print Area** and **Page Breaks** allows to print only what you need to print and separate big documents on pages just the way you want your data to be separated. Together with printing on a real printer, **RadSpreadsheet’s** printing gives you the opportunity to export your spreadsheet data in different file formats with the help of virtual printers.

This article aims to present the **Printing API** of **RadSpreadsheet** and demonstrate how to specify what and how to print the document. It contains the following subsections:

* [How to print RadSpreadsheet](https://www.telerik.com/products/winforms/documentation/controls/spreadsheet/features/printing#how-to-print-radspreadsheet)

* [Worksheet page setup](https://www.telerik.com/products/winforms/documentation/controls/spreadsheet/features/printing#worksheet-page-setup)

* [Ribbon UI](https://www.telerik.com/products/winforms/documentation/controls/spreadsheet/features/printing#ribbon-ui)

## How to print RadSpreadsheet

**RadSpreadsheet** provides you with variety of options for organizing and preparing the document’s data for printing.

Using the **PrintWhatSettings** class you may specify:

* **ExportWhat option:** Enumeration specifying whether to print the **Active Sheet**, the **Entire Workbook** or the current **Selection**.

* **IgnorePrintArea option:** Boolean value indicating whether or not to ignore print area when printing worksheets.

Printing **RadSpreadsheet** is easily done through the **Print** method which prints according to some given **PrintWhatSettings** instance.

Depending on whether you want to show a print preview before printing you may use the **PrintPreview** method:

#### Print Methods

```C#
// Prints silently to the default printer without showing the print dialog.
var settings = new PrintWhatSettings(ExportWhat.ActiveSheet, false);
radSpreadsheet1.SpreadsheetElement.Print(settings);

// Prints showing the print dialog.
radSpreadsheet1.SpreadsheetElement.PrintPreview();
```

```VB.NET
'Prints silently to the default printer without showing the print dialog.
Dim settings = New PrintWhatSettings(ExportWhat.ActiveSheet, False)
radSpreadsheet1.SpreadsheetElement.Print(settings)

'Prints showing the print dialog.
radSpreadsheet1.SpreadsheetElement.PrintPreview()
```

The bellow image shows the options available in the PrintPreview dialog.

> caption The PrintPreview dialog

![WinForms RadSpreadsheet PrintPreview dialog](https://www.telerik.com/products/winforms/documentation/assets/4e40d0f93659b0bdba354f2159f605ba/radspreadsheet-features-printing001.png)

## Worksheet page setup

When you need to set different print option such as page size, page orientation or when you want to print the spreadsheet grid lines you may set this options using the worksheet's page setup. For more detailed information you may follow [this link](https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/worksheetpagesetup) to **WorksheetPageSetup** documentation article.

> note You can apply headers and footers to the printed document. For more details on how to achieve this, refer to the [Headers and Footers topic](https://www.telerik.com/products/winforms/documentation/controls/spreadsheet/features/headers-and-footers).

## Ribbon UI

Our **RadSpreadsheetRibbonBar** allows you to print the current document as well. The print option is accessible from the application menu. In this case you have exactly the same options like in the **PrintPreview** dialog.

> caption Printing from RadSpreadsheetRibbonBar

![WinForms RadSpreadsheet Printing from RadSpreadsheetRibbonBar](https://www.telerik.com/products/winforms/documentation/assets/0c76bf762b5915213a7bbca2b3301822/radspreadsheet-features-printing002.png)

## See Also

* [Headers and Footers](https://www.telerik.com/products/winforms/documentation/controls/spreadsheet/features/headers-and-footers)
