[]
        
(Showing Draft Content)

更改数据透视表布局

数据透视表的不同布局使它在分析数据时更加灵活和方便。GcExcel支持以下数据透视表布局:

  • Compact form

  • Outline form

  • Tabular form

除此之外,您还可以选择插入空白行、设置小计的位置、显示所有项目或在透视表布局中重复任何项目。

参考下面的示例代码来设置透视表的布局和其他选项。

// Set pivot table layout
field_Category.setLayoutForm(LayoutFormType.Tabular);
field_Category.setLayoutBlankLine(true);

field_Country.setLayoutForm(LayoutFormType.Outline);
field_Country.setLayoutCompactRow(false);

// Set subtotal location
field_Country.setLayoutSubtotalLocation(SubtotalLocationType.Bottom);
field_Country.setShowAllItems(true);