跳到主要内容

End

返回表示指定范围中指定方向末端的 Range 对象。

语法

expression.End(direction);

expression - 表示 ApiRange 类的变量。

参数

名称必需/可选数据类型默认值描述
direction必需Direction指定范围中末端的方向。*

返回值

ApiRange

示例

获取表示电子表格中指定范围中指定方向终点的 Range 对象。

// Get a left end part of a range and fill it with color in a spreadsheet.

// Get a specified direction end of a range in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let range = worksheet.GetRange("C4:D5");
range.End("xlToLeft").SetFillColor(Api.CreateColorFromRGB(255, 213, 191));