跳到主要内容

Direction

指定指定区域中结束的方向。

类型

枚举

  • "xlUp"
  • "xlDown"
  • "xlToRight"
  • "xlToLeft"

示例

此示例展示如何获取表示指定区域左端的 Range 对象。

// How to set a direction of the range.

// Get a range and set its direction, color fill, etc.

const color = Api.CreateColorFromRGB(255, 224, 204);
worksheet.GetRange("C4:D5").End("xlToLeft").SetFillColor(color);