We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Error when exporting to csv with destinationType set to 'plain'

Answered
Raymond Halim asked 22 hours ago

Hi,

I encountered the following error when exporting to csv with destinationType set to 'plain'

TypeError: Cannot read properties of undefined (reading 'coords')
... at PivotApi.l2.exportTo...

The code is as follows:

this._pivotTable!.exportTo('csv', {destinationType: 'plain'},
(result: any) => { // Get data }
);

Note that the flexmonster version used is 2.9.88

Please advise.  Thank you.

1 answer

Public
Maksym Diachenko Maksym Diachenko Flexmonster 19 hours ago

Hello, Raymond!

Thank you for reaching out to us.

This issue is most likely caused by the export process being started while the component has not finished loading. To overcome this issue, you should start the export after the Flexmonster grid is fully loaded. This can be achieved with the reportcomplete event, which is fired when the data is loaded successfully and the grid is rendered.

Please let us know if our recommendation helped you.

Best Regards,
Maksym

Please login or Register to Submit Answer