Are there any solution to export a Flexmonster Flat grid with the API. I cant use the Callback-Function with Uint8 Array, if the View is flat. The destinationType is set to plain.
I need the Data from a Flat View to append it on a worksheet with sheetjs.
Hello,
Thank you for your question.
The technique for exporting the flat grid is the same as with the compact form.
destinationType: "plain"
parameter of the exportTo()
API call, your data will be returned as a Uint8Array and passed into the callbackHandler
.callbackHandler
function. It processes the resulting Uint8Array and combines multiple Excel tables as necessary.You can set the flat form either inside the "Options" toolbar tab or the options object inside the report
. Here is a code snippet how to set the grid type to flat:
options: {
grid: {
type: "flat"
}
}
Please check the example of exporting the flat grid: https://jsfiddle.net/flexmonster/7fqrv5jk/
Hope it helps.
Best Regards,
Maksym