' Print the second sheet FpSpread1.PrintSheet(1)
// Print cells B2 through D4. FarPoint.Win.Spread.PrintInfo PrintSettings = new FarPoint.Win.Spread.PrintInfo(); PrintSettings.PrintType = FarPoint.Win.Spread.PrintType.CellRange; PrintSettings.ColStart = 1; PrintSettings.ColEnd = 3; PrintSettings.RowStart = 1; PrintSettings.RowEnd = 3; // Create SheetView object and assign it to the first sheet FarPoint.Win.Spread.SheetView SheetToPrint = new FarPoint.Win.Spread.SheetView(); SheetToPrint.PrintInfo = PrintSettings; fpSpread1.Sheets[0] = SheetToPrint; // Print the sheet fpSpread1.PrintSheet(0); ' Print cells B2 through D4. ' Create PrintInfo object and set properties Dim PrintSettings As New FarPoint.Win.Spread.PrintInfo() PrintSettings.PrintType = FarPoint.Win.Spread.PrintType.CellRange PrintSettings.ColStart = 1 PrintSettings.ColEnd = 3 PrintSettings.RowStart = 1 PrintSettings.RowEnd = 3 ' Create SheetView object and assign it to the first sheet Dim SheetToPrint As New FarPoint.Win.Spread.SheetView() SheetToPrint.PrintInfo = PrintSettings FpSpread1.Sheets(0) = SheetToPrint ' Set the PrintInfo property for the first sheet FpSpread1.Sheets(0).PrintInfo = PrintSettings ' Print the sheet FpSpread1.PrintSheet(0)
// Print pages 5 through 10. // Create PrintInfo object and set properties FarPoint.Win.Spread.PrintInfo PrintSettings = new FarPoint.Win.Spread.PrintInfo(); PrintSettings.PrintType = FarPoint.Win.Spread.PrintType.PageRange; PrintSettings.PageStart = 5; PrintSettings.PageEnd = 10; // Set the PrintInfo property for the first sheet fpSpread1.Sheets[0].PrintInfo = PrintSettings; // Print the sheet fpSpread1.PrintSheet(0); ' Print pages 5 through 10. ' Create PrintInfo object and set properties Dim PrintSettings As New FarPoint.Win.Spread.PrintInfo() PrintSettings.PrintType = FarPoint.Win.Spread.PrintType.PageRange PrintSettings.PageStart = 5 PrintSettings.PageEnd = 10 ' Set the PrintInfo property for the first sheet FpSpread1.Sheets(0).PrintInfo = PrintSettings ' Print the sheet FpSpread1.PrintSheet(0)
// Print a child sheet FarPoint.Win.Spread.SheetView ss; ss = fpSpread1.Sheets[0].GetChildView(0, 0); if (ss != null) { fpSpread1.PrintSheet(ss); }; ' Print a child sheet Dim ss As FarPoint.Win.Spread.SheetView ss = FpSpread1.Sheets(0).GetChildView(0, 0) If Not ss Is Nothing Then FpSpread1.PrintSheet(ss) End If
// Print notes FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo(); pi.PrintNotes = FarPoint.Win.Spread.PrintNotes.AtEnd; fpSpread1.Sheets[0].PrintInfo = pi; ' Print notes Dim pi as New FarPoint.Win.Spread.PrintInfo() pi.PrintNotes = FarPoint.Win.Spread.PrintNotes.AtEnd fpSpread1.Sheets(0).PrintInfo = pi
// Print shapes FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo(); pi.PrintShapes =true; fpSpread1.Sheets[0].PrintInfo = pi; fpSpread1.PrintSheet(0); ' Print shapes Dim pi as New FarPoint.Win.Spread.PrintInfo() pi.PrintShapes = True fpSpread1.Sheets(0).PrintInfo = pi FpSpread1.PrintSheet(0)
// Get the number of pages to print int pageCnt; pageCnt = fpSpread1.GetPrintPageCount(0); ' Get the number of pages to print Dim pageCnt As Integer pageCnt = FpSpread1.GetPrintPageCount(0)