I'm attempting to create a pivot table through the Excel Javascript API, based off of some old code. With VBA, I could write something like
Worksheets(1).PivotTables(1).CalculatedFields.Add "PxS", _
"= Product * Sales"
to add a calculated field to a pivot table. I can't find an equivalent through the excel javascript api and I'm not sure if it just hasn't been added yet, or if I'm missing a feature somewhere.
The closest thing I've found is ShowAsRule, but I don't think the functionality there is equivalent (you can't use a custom formula)