Get Free Trial

Server-side pivot exports

Yousif Ahmed asked on February 25, 2020

Hi Flexmonster,
We have had a client feature request to provide scheduled exports of pivots (rendered with flexmonster), in both Excel and CSV formats. Of course currently these exports are generated interactively by our users in the browser using flexmonster’s export options. Ultimately what we are trying to figure out is a way of automating this so that we can generate flexmonster pivot exports directly from our server (running a .NET application).
With your knowledge of how flexmonster works, can you suggest any ways of approaching this? For example, would it be possible to run an instance of flexmonster directly on our server to power these exports, for example either using a headless browser or as part of a node.js app?
Any guidance/suggestions you can offer would be greatly appreciated!
Kind Regards,

1 answer

Illia Yatsyshyn Illia Yatsyshyn Flexmonster February 26, 2020

Hello, Yousif,
Thank you for reaching out to us.
Our team would like to confirm that generating the report on the backend is possible.
The general idea lies in using the headless browser technique to generate a page with Flexmonster in the browser, not displayed in the Interface. This way, you will have access to Flexmonster on the backend, and you will be able to use the API provided by the component, including the exportTo method allowing exporting the data in the desired format.
More information about the described approach can be found in our documentation.
Also, you are welcome to check out our GitHub sample that uses PhantomJS as a headless browser.
However, PhantomJS tool is suspended for now; thereby, we recommend considering using of Puppeteer node module in order to achieve the desired functionality.
Our team suggests using our PhantomJS sample as a template while implementing the solution with Puppeteer.
We hope it works for you.
Do not hesitate to contact us in case of additional questions on this point.
Best regards,

Please login or Register to Submit Answer