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

UsedRangeType

Enum Class UsedRangeType

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

public enum UsedRangeType extends Enum<UsedRangeType>
指定用于确定工作表已用区域的功能类型。

此枚举与 IWorksheet.getUsedRange(java.util.EnumSet) 和 IRange.getUsedRange(java.util.EnumSet) 一起使用,可以根据特定功能类型(如数据、样式、注释等)检索已用区域。


 worksheet.getRange("A1").setValue("Data");
 worksheet.getRange("B2").getInterior().setColor(Color.GetLightBlue());
 
 // Get the used range that contains only data
 IRange dataRange = worksheet.getUsedRange(EnumSet.of(UsedRangeType.Data));
 
 // Get the used range that contains data and style
 IRange dataStyleRange = worksheet.getUsedRange(
     EnumSet.of(UsedRangeType.Data, UsedRangeType.Style));
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    指定已用区域包括图表坐标轴覆盖的单元格。
    指定已用区域包含被图表覆盖的单元格。
    指定已用区域包含具有注释的单元格。
    指定已用区域包含具有条件格式规则的单元格。
    指定已用区域包含含有数据(值或公式)的单元格。
    指定已用区域包含具有数据验证规则的单元格。
    指定已用区域包括筛选器覆盖的单元格。
    指定已用区域包含含有超链接的单元格。
    指定已用区域包括合并单元格。
    指定无功能类型。
    指定已用区域包含被图片覆盖的单元格。
    指定已用区域包含被数据透视表覆盖的单元格。
    指定已用区域包含被形状覆盖的单元格。
    指定已用区域包含被切片器覆盖的单元格。
    指定已用区域包括排序区域覆盖的单元格。
    指定已用区域包含含有迷你图的单元格。
    指定已用区域包含应用了自定义样式的单元格。
    指定已用区域包含被表覆盖的单元格。
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static UsedRangeType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • None

      public static final UsedRangeType None
      指定无功能类型。
    • Data

      public static final UsedRangeType Data
      指定已用区域包含含有数据(值或公式)的单元格。
    • Style

      public static final UsedRangeType Style
      指定已用区域包含应用了自定义样式的单元格。
    • Axis

      public static final UsedRangeType Axis
      指定已用区域包括图表坐标轴覆盖的单元格。
    • Chart

      public static final UsedRangeType Chart
      指定已用区域包含被图表覆盖的单元格。
    • Comment

      public static final UsedRangeType Comment
      指定已用区域包含具有注释的单元格。
    • ConditionalFormatting

      public static final UsedRangeType ConditionalFormatting
      指定已用区域包含具有条件格式规则的单元格。
    • DataValidation

      public static final UsedRangeType DataValidation
      指定已用区域包含具有数据验证规则的单元格。
    • Filter

      public static final UsedRangeType Filter
      指定已用区域包括筛选器覆盖的单元格。
    • Merge

      public static final UsedRangeType Merge
      指定已用区域包括合并单元格。
    • Picture

      public static final UsedRangeType Picture
      指定已用区域包含被图片覆盖的单元格。
    • PivotTable

      public static final UsedRangeType PivotTable
      指定已用区域包含被数据透视表覆盖的单元格。
    • Slicer

      public static final UsedRangeType Slicer
      指定已用区域包含被切片器覆盖的单元格。
    • Shape

      public static final UsedRangeType Shape
      指定已用区域包含被形状覆盖的单元格。
    • Sort

      public static final UsedRangeType Sort
      指定已用区域包括排序区域覆盖的单元格。
    • Sparkline

      public static final UsedRangeType Sparkline
      指定已用区域包含含有迷你图的单元格。
    • Table

      public static final UsedRangeType Table
      指定已用区域包含被表覆盖的单元格。
  • Method Details

    • values

      public static UsedRangeType[] 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 UsedRangeType 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