Error to export data to excel file from grid/ jquery

1 Answer 24 Views
Grid
Edison
Top achievements
Rank 1
Edison asked on 22 Feb 2024, 04:58 PM | edited on 22 Feb 2024, 07:10 PM

Hi there,

Currently I try to export data from a grid with details, however when I trigger the event export the UI generate the next error.

Code: In this object we have the data.

The code run until at the end and after this is the message.

I am using the documentation and examples, but dont works too.

https://docs.telerik.com/kendo-ui/knowledge-base/detail-grid-export

Another thing I reviewed that work with angular.

Thank you for your help !

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 27 Feb 2024, 12:03 PM

Hi,

With the update to the latest JsZip library, the synchronous methods were deprecated, so you should use the async methods to get the dataURL. Here is an updated code that exports the workbook properly:

            // Save the workbook.
          	new kendo.ooxml.Workbook(workbook).toDataURLAsync().then(function(data) {
              kendo.saveAs($.extend({
                dataURI: data,
                fileName: "Export.xlsx"
              }));
            })

We have updated the KB article and soon the changes should be live as well.

Regards,
Peter Milchev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Edison
Top achievements
Rank 1
commented on 27 Feb 2024, 12:59 PM

Hi Peter, yes i figured out and I wont solved the issues. 

Thank you for your help!

Regards,

Edison Fernandez.

Tags
Grid
Asked by
Edison
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or