sort_by方法
sort_by(self, sort_type, field_sorted_by)
对此数据透视表字段进行排序。
def sort_by(self, sort_type, field_sorted_by):
...
范围 | 类型 | 描述 |
---|---|---|
sort_type | SortOrder | 对此字段进行排序的类型。 |
field_sorted_by | int | 按枢轴字段排序的索引。 -1表示按照该字段的数据标签排序,其它表示按照数据字段的索引排序。 |
sort_by(self, sort_type, field_sorted_by, data_type, cell_name)
对此数据透视表字段进行排序。
def sort_by(self, sort_type, field_sorted_by, data_type, cell_name):
...
范围 | 类型 | 描述 |
---|---|---|
sort_type | SortOrder | 对此字段进行排序的类型。 |
field_sorted_by | int | 按枢轴字段排序的索引。 -1表示按照该字段的数据标签排序,其它表示按照数据字段的索引排序。 |
data_type | PivotLineType | 按其排序的数据类型。 |
cell_name | str | 按行或列中的值排序 |