跳到主要内容

SetOrientation

Sets an angle to the current cell range.

Syntax

expression.SetOrientation(angle);

expression - A variable that represents a ApiRange class.

Parameters

NameRequired/OptionalData typeDefaultDescription
angleRequiredAngleSpecifies the range angle.

Returns

This method doesn't return any data.

Example

This example sets an angle to the cell range.

let worksheet = Api.GetActiveSheet();
worksheet.GetRange("A1").SetValue("1");
worksheet.GetRange("B1").SetValue("2");
let range = worksheet.GetRange("A1:B1");
range.SetOrientation("xlUpward");