[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

InsertShiftDirection

Enum Class InsertShiftDirection

java.lang.Object
java.lang.Enum<InsertShiftDirection>
com.grapecity.documents.excel.InsertShiftDirection
All Implemented Interfaces:
Serializable, Comparable<InsertShiftDirection>, Constable

public enum InsertShiftDirection extends Enum<InsertShiftDirection>
指定将单元格或单元格区域插入工作表时单元格的移动方向。

与 IRange.insert(InsertShiftDirection) 方法一起使用,可以控制现有单元格是下移还是右移,以便为新插入的单元格腾出空间。


 worksheet.getRange("A1:C3").setValue(new Object[][] {
     {1, 2, 3},
     {4, 5, 6},
     {7, 8, 9}
 });
 worksheet.getRange("B2").insert(InsertShiftDirection.Down);
 worksheet.getRange("C2").insert(InsertShiftDirection.Right);
 
  • Enum Constant Details

  • Method Details

    • values

      public static InsertShiftDirection[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static InsertShiftDirection valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null