Back to Devexpress

SpreadsheetPrintOptions.PrintContent Property

officefileapi-devexpress-dot-xtraspreadsheet-dot-spreadsheetprintoptions-ec7bd7ea.md

latest3.5 KB
Original Source

SpreadsheetPrintOptions.PrintContent Property

Specifies spreadsheet content to print/display within the Print Preview.

Namespace : DevExpress.XtraSpreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
[DefaultValue(SpreadsheetPrintContent.Default)]
[XtraSerializableProperty]
public SpreadsheetPrintContent PrintContent { get; set; }
vb
<DefaultValue(SpreadsheetPrintContent.Default)>
<XtraSerializableProperty>
Public Property PrintContent As SpreadsheetPrintContent

Property Value

TypeDefaultDescription
SpreadsheetPrintContentDefault

An enumeration member that specifies spreadsheet content to print.

|

Available values:

NameDescription
Default

The default value (that is EntireWorkbook ).

| | ActiveSheets |

Prints the active sheet and all selected sheets (if any). To print multiple sheets, hold Ctrl while you click sheet tabs in the control.

| | EntireWorkbook |

Prints the entire workbook.

| | Selection |

Prints selected cells of the active worksheet. If a chart sheet is active, it is printed completely.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to PrintContent
SpreadsheetControlOptions

.Print .PrintContent

|

Remarks

Use the PrintContent property to specify what to print in the Spreadsheet control.

You can set this property to one of the following values:

  • Default - default value (= EntireWorkbook).

  • EntireWorkbook - prints the entire workbook.

  • ActiveSheets - prints the active sheet and all selected sheets (if any). To print multiple sheets, hold Ctrl when you click sheet tabs in the control.

  • Selection - prints selected cells of the active worksheet. If a chart sheet is active, it is printed completely.

The following example specifies that the Spreadsheet control should print only selected sheets.

csharp
spreadsheetControl1.Options.Print.PrintContent =
    DevExpress.XtraSpreadsheet.SpreadsheetPrintContent.ActiveSheets;
vb
SpreadsheetControl1.Options.Print.PrintContent =
    DevExpress.XtraSpreadsheet.SpreadsheetPrintContent.ActiveSheets

See Also

SpreadsheetPrintOptions Class

SpreadsheetPrintOptions Members

DevExpress.XtraSpreadsheet Namespace