How do you add a calculated data column to a pivot table via the Java API?

I found this snippet in an old .Net post but I can't figure out how it translates to the Java equivalent:

pivotTable.AddCalculatedField("test","='Sales Test' * 2");

Thanks.

Hi,

The feature is not available we will look into it soon. We have added your feature request into our issue tracking system with an issue id: CELLSJAVA-12894.

Thank you.

Amjad Sahi:
The feature is not available we will look into it soon.

It's not available for the Java version API? Or any of the versions? How do you explain the two-year-old code snippet I quoted above: pivotTable.AddCalculatedField ? Thanks.

Hi,

Yes, the related API is not available in Java version of the product. It is only available in .NET version of the product. Actually we did not get this feature request for Java before. But we will surely look into it soon.

Thank you.

Amjad Sahi:
Yes, the related API is not available in Java version of the product. It is only available in .NET version of the product.

Do you know if the .Net version can be run on Linux with Mono? Thanks again.

Hi,

Thank you for considering Aspose.

Yes, Aspose.Cells for .NET version works fine on Linux with Mono. Also, as per the support of your requested feature in Aspose.Cells for Java, we will provide a new fix in 1 ~ 2 days.

Thank You & Best Regards,

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have added a new method as following:

void com.aspose.cells.PivotTable.addCalculatedField(String name, String formula, boolean dragToDataArea)

This method adds a calculated field to pivot field. Following are the parameter details:
Parameters:
name The name of the calculated field
formula The formula of the calculated field.
dragToDataArea drag this field to data area immediately if true.

Thank You & Best Regards,

nausherwan.aslam:

Please try the attached latest version of Aspose.Cells. We have added a new method as following:


Thanks but I went ahead and used the .Net version with Mono.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.