SetPageOrientation
Sets the page orientation.
Syntax
expression.SetPageOrientation(sPageOrientation);
expression
- A variable that represents a ApiWorksheet class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sPageOrientation | Required | PageOrientation | The page orientation type. |
Returns
This method doesn't return any data.
Example
This example sets the page orientation.
var oWorksheet = Api.GetActiveSheet();
oWorksheet.SetPageOrientation("xlPortrait");
var sPageOrientation = oWorksheet.GetPageOrientation();
oWorksheet.GetRange("A1").SetValue("Page orientation: ");
oWorksheet.GetRange("C1").SetValue(sPageOrientation);