Get Free Trial

Export Flat Grid to uint8array

Matko asked 6 days ago

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.

1 answer

Maksym Diachenko Maksym Diachenko Flexmonster 6 days ago


Thank you for your question.

The technique for exporting the flat grid is the same as with the compact form.

  • While using the destinationType: "plain" parameter of the exportTo() API call, your data will be returned as a Uint8Array and passed into the callbackHandler.
  • Next, a 3rd party library (e.g., SheetJS) is used in 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:

Hope it helps.

Best Regards,

Please login or Register to Submit Answer