| Visual Basic (Declaration) | |
|---|---|
Public Property PrintType As PrintType | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public PrintType PrintType {get; set;} | |
Return Value
PrintType setting that determines the type of print rangeThis example shows how to specify that only part of the sheet prints.
| C# | Copy Code |
|---|---|
// Typically, not all of these settings are used together but are included here for illustration purposes | |
| Visual Basic | Copy Code |
|---|---|
' Typically, not all of these settings are used together but are included here for illustration purposes | |
If you set the value to PrintType.CellRange, specify the cell range by setting these PrintInfo properties:
If you set the value to PrintType.PageRange, specify the page range by setting these PrintInfo properties:
The setting of this property and the other print range properties might be overridden if the UseMax property is set to true. When the UseMax property is set to true, empty cells beyond the columns and rows containing data are not printed. You can return the number of the last column and row containing data using the SheetView NonEmptyColumnCount and NonEmptyRowCount properties.
| Note: If you have set the SheetView FrozenColumnCount or FrozenRowCount property to freeze columns or rows, the frozen columns or rows also print with your range, even if they are not included in the range you specify. |
Reference
PrintInfo ClassPrintInfo Members
PrintType Enum
UseMax Property
FrozenColumnCount Property (SheetView Class)
FrozenRowCount Property (SheetView Class)
NonEmptyColumnCount Property (SheetView Class)
NonEmptyRowCount Property (SheetView Class)
ColEnd Property
ColStart Property
PageEnd Property
PageStart Property
RowEnd Property
RowStart Property