Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Export the pivot to excel and filled up the group values

Answered
Rommel Manalo asked on September 23, 2020

I want the exact layout to be exported to excel, but I want the empty values to have populated on excel.
The flat form is not an option, here because I need it to be an aggregated result.
 
 

Attachments:
Flex1.png
Flex2.png

2 answers

Public
Milena Pechura Milena Pechura Flexmonster September 24, 2020

Hello,
 
Thank you for writing to us and providing screenshots of desired component behavior.
 
To achieve the mentioned grid appearance, we suggest using customizeCell API call that allows the customizing of separate cells.
Please see the following code snippet for the reference:

var pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
customizeCell: customizeCellFunction,
report: {
"dataSource": {
"data": getData()
},
}
});


function customizeCellFunction(cell, data) {
if (data && data.type == "header" && data.member && data.member.caption != 'All' && data.label == "") {
cell.text = "    " + data.member.caption;
}
}

 
Here is an example for illustration: https://jsfiddle.net/flexmonster/zkm26d6h/.
 
Also, we would like to mention that the grid will be exported to Excel with all specified customization.
 
Please let us know if any further questions arise.
 
Best regards,
Milena

Public
Rommel Manalo September 24, 2020

Awesome! This is really what i want.
 
Thanks

Please login or Register to Submit Answer