跳到主要内容

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.

var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("1");
oWorksheet.GetRange("B1").SetValue("2");
var oRange = oWorksheet.GetRange("A1:B1");
oRange.SetOrientation("xlUpward");