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

LayoutFormType

Enum Class LayoutFormType

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

public enum LayoutFormType extends Enum<LayoutFormType>
指定字段的数据透视表项的显示方式。

将此枚举与 IPivotField.setLayoutForm(LayoutFormType) 一起使用,可按表格形式或大纲形式显示项。Tabular 以表格形式显示字段,Outline 以大纲形式显示字段。


 worksheet.getRange("A1:C4").setValue(new Object[][] {
     {"Category", "Product", "Amount"},
     {"Fruit", "Apple", 100},
     {"Fruit", "Orange", 200},
     {"Vegetable", "Carrot", 150}
 });
 IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C4"));
 IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"));
 IPivotField field = pivotTable.getPivotFields().get("Category");
 field.setOrientation(PivotFieldOrientation.RowField);
 field.setLayoutForm(LayoutFormType.Outline);
 
  • Enum Constant Details

    • Tabular

      public static final LayoutFormType Tabular
      默认。
    • Outline

      public static final LayoutFormType Outline
      LayoutSubtotalLocation 属性指定小计在数据透视表报告中的显示位置。
  • Method Details

    • values

      public static LayoutFormType[] 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 LayoutFormType 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 LayoutFormType forValue(int value)