[]
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 property of the PrintInfo object or use the OwnerPrintDraw method for the control. As with the other printing tasks, such as Printing an Entire Sheet, this involves the PrintSheet method.
Set the PrintType property and use the PrintSheet method to print.
This example specifies an area to print.
// 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);
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)
Printing a Child View of a Hierarchical Display
Printing the Portion of the Sheet with Data
Printing a Range of Cells on a Sheet