# Printing an Entire Sheet

Learn how to print spreadsheets using the Spread component with the PrintSheet() and SafePrint() methods. Customize print settings and optimize printing using rules.

## Content

You can print spreadsheets using the Spread component in the following two ways:

* [Using the PrintSheet() Method](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printsheet#using-the-printsheet-method)
* [Using the SafePrint() Method](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printsheet#using-the-safeprint-method)

## Using the PrintSheet() Method

You can use this method to print a particular sheet or multiple sheets using the [PrintInfo](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.PrintInfo.html) settings for each sheet. Each sheet can have its own **PrintInfo** object, but you can call the **PrintSheet** method once to print one or all of the sheets. If the sheet parameter is set to -1, all the sheets in the Spread component will print, with each sheet (with its individual **PrintInfo** settings) as a separate print job. The [PrintDocument](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.PrintDocument.html) event occurs while printing a sheet.
The default setting prints in black and white and automatically determines the best order in which you can print the pages. With the default settings, the following items can be printed using the printer’s current orientation setting:

* All the columns and rows in the sheet (but only the cells that have data in them)
* The sheet’s border
* The column and row headers
* The header shadows
* The grid lines

To customize these settings, refer to [Understanding the Printing Options](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-printoptions) and [Customizing the Printed Page Header or Footer](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-printheadfoot). To allow Spread to determine the best print settings, refer to [Optimizing the Printing Using Rules](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printoptimize/spwin-printsmart).
You can call the **PrintSheet()** method with different sheet parameters one after the other but calling this method on the same sheet without waiting for the initial print to conclude could produce incorrect results. Before calling the next print for a given sheet, you need to wait for the previous one to be finished. You can do this by catching the **PrintMessageBox** event and querying the BeginPrinting parameter to see if it is False.
**Using Code**
Use the **PrintSheet** method in the [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class to print the specified sheet.
**Example**
This example code prints the second sheet in the component using the PrintSheet() method.

```csharp
fpSpread1.PrintSheet(1);
```

```vbnet
fpSpread1.PrintSheet(1)
```

## Using the SafePrint() Method

The SafePrint() method provides users with the flexibility to execute print jobs in a single thread, rather than creating a separate thread. Since it allows printing in the stream synchronously in the same thread, the UI becomes unresponsive till the print operation is complete.
Using this method, you can print spreadsheets in a console application.
**Using Code**
Use the **SafePrint** method in the [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class to print the spreadsheet in a console application.
**Example**
This example code prints the second sheet in the console application using the SafePrint() method.

```csharp
fpSpread1.SafePrint(fpSpread1,0);
```

```vbnet
fpSpread1.SafePrint(fpSpread1,0)
```

You can also use the Spread Designer in order to set properties for printing, and you can also print directly from the Spread Designer. For more information, refer to [Printing a Sheet from Spread Designer](/spreadnet/docs/latest/online-win/overview/spwin-designerguide/spwin-spd-using/spwin-spd-printsheet).

## See Also

[Printing to PDF](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printPDF)
[Printing a Child View of a Hierarchical Display](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printhierarchy)
[Printing Particular Pages](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printpages)
[Printing the Portion of the Sheet with Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printdataarea)
[Printing a Range of Cells on a Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printrange)
[Printing an Area of the Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printarea)
[Printing a Sheet with Cell Notes](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printnotes)
[Printing a Sheet with Shapes](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printshapes)
[Printing in Duplex Mode](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/PrintingDuplexMode)