Hello I want to export pivot grid with expanded rows and columns to excel/ pdf. The current demo does not reflect this.
3 Answers, 1 is accepted
answered on 11 May 2018, 10:22 AM
I am afraid that expanding all rows and columns in a PivotGrid widget is not available out of the box. It is possible to explicitly expanding a row or column via expandRow and expandColumn methods. Note that the methods accept the full member names as argument.
With that said, it is possible to iterate over the items in the PivotGrid and expand the rows and columns manually. However, have in mind that this can generate additional overhead since a lot of data will be requested from the server.
The reason why I asked for expanded rows and columns is export to excel. Export to Excel feature does not export all rows and columns data. It only exports expanded rows and columns. I need that to be resolved otherwise this options is of no use to us.
answered on 15 May 2018, 10:56 AM
When exporting the PivotGrid component the data is exported as it is displayed. Expanding rows and columns automatically is not a built-in feature for the widget. Thus, if the Excel file needs to show the data expanded this will require custom code. The code should iterate through the data and expand the rows and columns manually. After this calling saveAsExcel will trigger the export.