跳到主要内容

GetPageOrientation

Returns the page orientation.

Syntax

expression.GetPageOrientation();

expression - A variable that represents a ApiWorksheet class.

Parameters

This method doesn't have any parameters.

Returns

PageOrientation

Example

This example shows how to get the page orientation.

let worksheet = Api.GetActiveSheet();
let pageOrientation = worksheet.GetPageOrientation();
worksheet.GetRange("A1").SetValue("Page orientation: ");
worksheet.GetRange("C1").SetValue(pageOrientation);