Back to Devexpress

Sheet.Print() Method

officefileapi-devexpress-dot-spreadsheet-dot-sheet-1f8f9e70.md

latest2.4 KB
Original Source

Sheet.Print() Method

Prints the current sheet using the default printer settings.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void Print()
vb
Sub Print

Remarks

Use the current Print method overload to send the specified sheet to the default printer. To select another printer and change printer settings, create a PrinterSettings class instance and pass it to the Print method as a parameter.

The following example prints the active worksheet in a document using the default settings:

csharp
workbook.Worksheets.ActiveWorksheet.Print();
vb
workbook.Worksheets.ActiveWorksheet.Print()

To define general page options, use properties of the WorksheetView object accessible from the Worksheet.ActiveView property. WorksheetView enables you to specify page orientation, margins and paper size settings.

The WorksheetPrintOptions object’s properties allow you to specify more print-specific options, which include scaling, printing gridlines, titles, row and column headings, setting page order and more.

For more information on how to specify print settings and print a document, refer to the Printing example section.

See Also

WorksheetView

WorksheetPrintOptions

WinForms Spreadsheet Control Examples

Sheet Interface

Sheet Members

DevExpress.Spreadsheet Namespace