Back to Devexpress

SheetView.Orientation Property

officefileapi-devexpress-dot-spreadsheet-dot-sheetview-2db02e3c.md

latest5.6 KB
Original Source

SheetView.Orientation Property

Returns or specifies page orientation for a printed sheet.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
PageOrientation Orientation { get; set; }
vb
Property Orientation As PageOrientation

Property Value

TypeDescription
PageOrientation

An enumeration member that specifies page orientation.

|

Available values:

NameDescription
Default

Worksheet page orientation is default.

| | Landscape |

Worksheet page orientation is landscape.

| | Portrait |

Worksheet page orientation is portrait.

|

Remarks

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.

View Example

csharp
// Set the page orientation to Landscape.
workbook.Worksheets[0].ActiveView.Orientation = PageOrientation.Landscape;
vb
' 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

csharp
// 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

csharp
// Specify print settings.
chartSheet.ActiveView.Orientation = PageOrientation.Landscape;
chartSheet.ActiveView.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Letter;

spreadsheet-document-api-examples-part1/CS/SpreadsheetExamples/SpreadsheetActions/WorksheetActions.cs#L144

csharp
// 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

vb
' 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

vb
' Specify print settings.
chartSheet.ActiveView.Orientation = PageOrientation.Landscape
chartSheet.ActiveView.PaperKind = DXPaperKind.Letter

spreadsheet-document-api-examples-part1/VB/SpreadsheetExamples/SpreadsheetActions/WorksheetActions.vb#L139

vb
' Set the page orientation to Landscape.
            workbook.Worksheets(0).ActiveView.Orientation = PageOrientation.Landscape
#End Region ' #PageOrientation

See Also

SheetView Interface

SheetView Members

DevExpress.Spreadsheet Namespace