Do Aspose cell support aggregation method � �distinct count� for pivot table data fields?

Do Aspose cell support aggregation method – ‘distinct count’ for pivot table data fields? It is present in Excel 2013.

I have downloaded aspose-cells-8.4.0-java jar file from your website (http://www.aspose.com/community/getting-started/java-components/aspose.cells-for-java.aspx ). There is no error but I cannot able to change aggregation method for columns (by default aggregation method used on column is sum). I want to change to some other method, say – count, average. I am not talking about subtotals for row, but for whole column (grand Summary for column).

Hi,

Well, you may try PivotField.setFunction() method to accomplish your task, see the sample code segment below for your reference:
e.g
Sample code:
....................
pivotTable.setRowGrand(true);
pivotTable.setColumnGrand(true);
pivotTable.getDataFields().get(0).setFunction(ConsolidationFunction.AVERAGE);
.........

please check the ConsolidationFunction class (Utility class containing constants that represents consolidation function) to get the complete list of fields which denote all the supported constants by Aspose.Cells APIs.

Thank you.

What I am asking is, does Aspose cell supports ‘count distinct’ aggregation method in data fields for pivot table, like you shown for Average in sample code?

Hi,


I am afraid your desired MS Excel 2013 feature is not supported in PivotTables. I have logged a ticket for your requested feature with an id “CELLSJAVA-41374 - Add “Distinct Count” Constant to ConsolidationFunction class in Pivot Tables” into our database. Our concerned developer from product team will evaluate your requested feature and we will try to implement it soon.

Once we have any update on it, we will let you know here.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-41374) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi,

Thanks for using Aspose.Cells.

Please download and use the latest fix: Aspose.Cells for Java 8.5.2 that supports this feature.

Please note that we only can support it when the pivot table is created from the template file and
the pivot table is created with data model by Excel since 2013.


If the pivot table is created without data model of Excel 2013 and “Distinct count” is set, the file will be corrupted