# Printing an Area of the Sheet

Learn how to print a specified area of a sheet using the PrintType property and OwnerPrintDraw method for the control. Example in C# and VB included.

## Content

You may not want to print the entire sheet but only a specified area of the sheet. You can specify an area of the sheet with the [PrintType](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.PrintType.html) property of the **PrintInfo** object or use the [OwnerPrintDraw](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.OwnerPrintDraw.html) method for the control. As with the other printing tasks, such as [Printing an Entire Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printsheet), this involves the [PrintSheet](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.PrintSheet.html) method.

## Using Code

Set the [PrintType](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.PrintType.html) property and use the [PrintSheet](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.PrintSheet.html) method to print.

## Example

This example specifies an area to print.

```csharp
// Create the printer settings object
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
// Allow printing of only 20 columns and 20 rows of cells
printset.ColStart = 1;
printset.ColEnd = 20;
printset.RowStart = 1;
printset.RowEnd = 20;
printset.PrintType = FarPoint.Win.Spread.PrintType.CellRange;
// Assign the printer settings to the sheet and print it
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
```

```vbnet
Dim printset As New FarPoint.Win.Spread.PrintInfo
' Allow printing of only 20 columns and 20 rows of cells
printset.ColEnd = 20
printset.ColStart = 1
printset.RowStart = 1
printset.RowEnd = 20
printset.PrintType = FarPoint.Win.Spread.PrintType.CellRange
' Assign the printer settings to the sheet and print it
fpSpread1.Sheets(0).PrintInfo = printset
fpSpread1.PrintSheet(0)
```

## See Also

[Printing an Entire Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printactions/spwin-printsheet)
[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 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)