Get Free Trial

modify export to excel filename

Rejesh K R asked on April 24, 2019

Hi Team,
In my application i have 9 pivot reports. I need different file name for excel export to all the reports.
Currently all the export are saving as “pivot.xlsx”. Kindly check and do the needful
Rejesh K R

1 answer

Vera Didenko Vera Didenko Flexmonster April 24, 2019

Hello, Rejesh,
Thank you for writing to us.
In Flexmonster the default filename for the Excel export is set to “pivot”.
This can be changed via the filename parameter in the options object (the second parameter of the exportTo() API call):

//The filename is set to "Colors" via the filename parameter:

pivot1.exportTo("excel", { filename: "Colors", excelSheetName: "Pivot Table"} );

Here is a JSFiddle example for illustration.
In the example, you can see how a separate Excel file per each report is generated, each having a different name.
Please let us know if this works for you and if you have further questions.
We are looking forward to hearing from you.
Best Regards,

Please login or Register to Submit Answer