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

SortOrientation

Enum Class SortOrientation

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

public enum SortOrientation extends Enum<SortOrientation>
指定排序区域时使用的方向。

使用此枚举可以指示排序是按行还是按列执行。它通常与 IRange.sort(IRange,SortOrder,SortOrientation) 和 ISort.setOrientation(SortOrientation) 一起使用。


 worksheet.getRange("A1").setValue(2);
 worksheet.getRange("A2").setValue(1);
 worksheet.getRange("B1").setValue("B");
 worksheet.getRange("B2").setValue("A");
 worksheet.getRange("A1:B2").sort(worksheet.getRange("A1:A2"), SortOrder.Ascending, SortOrientation.Columns);
 
  • Enum Constant Details

  • Method Details

    • values

      public static SortOrientation[] 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 SortOrientation 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
    • getValue

      public int getValue()
    • forValue

      public static SortOrientation forValue(int value)