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

SheetTabType

Enum Class SheetTabType

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

public enum SheetTabType extends Enum<SheetTabType>
指定工作表选项卡的类型。

此枚举标识工作表选项卡表示的是表格工作表、甘特图工作表还是报表工作表。它通常与 ISheetTab 一起使用,用于检查工作簿中的工作表选项卡信息。


 workbook.open("import.sjs");
 ISheetTabs sheetTabs = workbook.getSheetTabs();
 if (sheetTabs.getCount() > 0) {
     ISheetTab sheetTab = sheetTabs.get(0);
     SheetTabType tabType = sheetTab.getSheetType();
 }
 
  • Enum Constant Details

    • TableSheet

      public static final SheetTabType TableSheet
      表示一个集算表。
    • GanttSheet

      public static final SheetTabType GanttSheet
      表示一个甘特表。
    • ReportSheet

      public static final SheetTabType ReportSheet
      表示一个报表。
  • Method Details

    • values

      public static SheetTabType[] 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 SheetTabType 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()
      获取与此工作表标签类型关联的整数值。

      此值可与 fromValue(int) 一起使用,用于在枚举常量及其对应的数值表示之间转换。

      Returns:
      与此工作表标签类型关联的整数值。
    • fromValue

      public static SheetTabType fromValue(int value)
      获取与指定整数值对应的 SheetTabType 枚举常量。

      使用此方法可将 getValue() 返回的整数值转换为匹配的 SheetTabType 常量。如果指定值不匹配任何已定义的常量,则返回 null。

      Parameters:
      value - 工作表标签类型的整数值。
      Returns:
      匹配的 SheetTabType;如果未找到匹配的常量,则为 null。