Hi,
Is there a way that I can read the formula of a calulated pivot field from a pivot table?
For example, 'GST' is with formula 'Total * 0.1'. Can I get 'Total * 0.1' from the pivot field 'GST'?
And is there a way I can know a field is a calculated field?
Regards
Bill
Solvexia
Hi,
I am afraid, there is no direct way/API to accomplish your task. I have logged a ticket for your desired feature(s) with an id: CELLSNET-31109. We will look into it to support it soon.
Thank you.
Thanks Amjad,
Looking forward to try the new version.
Regards
Bill
Hi,
Please download: Aspose.Cells for .NET v7.0.1.6
You can use the method field.IsCalculatedField to indicate the field is a calculated field and field.GetCalculatedFieldFormula() to get the formula of the field in the latest aspose version.
C#
wb.Worksheets[0].PivotTables[0].BaseFields[0].IsCalculatedField;
wb.Worksheets[0].PivotTables[0].BaseFields[0].GetCalculatedFieldFormula();
Thanks Shakeel! Much appreciated.