officefileapi-devexpress-dot-spreadsheet-dot-sheetview-2db02e3c.md
Returns or specifies page orientation for a printed sheet.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
PageOrientation Orientation { get; set; }
Property Orientation As PageOrientation
| Type | Description |
|---|---|
| PageOrientation |
An enumeration member that specifies page orientation.
|
Available values:
| Name | Description |
|---|---|
| Default |
Worksheet page orientation is default.
| | Landscape |
Worksheet page orientation is landscape.
| | Portrait |
Worksheet page orientation is portrait.
|
This example demonstrates how to set the orientation of worksheet pages via the Worksheet.ActiveView.Orientation property. The PageOrientation enumerator lists available page orientation types.
Note
The WorksheetView.Orientation property value is used when worksheet pages are printed. To learn how to specify other worksheet print options, see the How to: Specify Print Settings document.
// Set the page orientation to Landscape.
workbook.Worksheets[0].ActiveView.Orientation = PageOrientation.Landscape;
' Set the page orientation to Landscape.
workbook.Worksheets(0).ActiveView.Orientation = PageOrientation.Landscape
The following code snippets (auto-collected from DevExpress Examples) contain references to the Orientation property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/CodeExamples/ChartSheetActions.cs#L145
// Specify print settings.
chartSheet.ActiveView.Orientation = PageOrientation.Landscape;
chartSheet.ActiveView.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Letter;
winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/CodeExamples/ChartSheetActions.cs#L145
// Specify print settings.
chartSheet.ActiveView.Orientation = PageOrientation.Landscape;
chartSheet.ActiveView.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Letter;
// Set the page orientation to Landscape.
workbook.Worksheets[0].ActiveView.Orientation = PageOrientation.Landscape;
#endregion #PageOrientation
wpf-spreadsheet-chart-api/VB/SpreadsheetWPFChartAPISamples/CodeExamples/ChartSheetActions.vb#L140
' Specify print settings.
chartSheet.ActiveView.Orientation = PageOrientation.Landscape
chartSheet.ActiveView.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Letter
winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/CodeExamples/ChartSheetActions.vb#L139
' Specify print settings.
chartSheet.ActiveView.Orientation = PageOrientation.Landscape
chartSheet.ActiveView.PaperKind = DXPaperKind.Letter
' Set the page orientation to Landscape.
workbook.Worksheets(0).ActiveView.Orientation = PageOrientation.Landscape
#End Region ' #PageOrientation
See Also