excelpivot-tableoffice-jsoffice-addinsexcel-web-addins

Officejs How to enable Classic Pivot Layout on Pivot Table


I have created a Pivot Table in my office add-in but I can not figure out how to enable the "Classic PivotTable Layout" in code.

The feature of the Pivot table that I am trying to enable is shown below in the screen shot. This would allow the user to drag in or remove fields on the fly without needing to use the PivotTable Fields list. I feel like I have looked through all the PivotTable, PivotLayour and Hierarchy classes and have not found the feature yet.

Classic Mode


Solution

  • The Office JavaScript API doesn't provide such settings. You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team goes through the planning process.

    You may check the Work with PivotTables using the Excel JavaScript API page for available in Office JavaScript API methods, properties and classes for dealing with Pivot Tables.