1
votes

I am trying to export kendo grid. It has around more than 27K records. when i try to export i get "Failed Network error" error in chrome, but this works fine on FF. I also tried to create kendo.ooxml.Workbook and tried to save it by Kendo.saveAs() but it also gives me same error. So i had to switch to server side.

Is there a limitation on Kendo.saveAs() method for file size ? It is strange that this scenario works fine on FireFox.

2
Having the same issue (for PDF export only. Excel worked immediately). Did you find a solution or cause in the meantime?mesosteros
Nop I did not find solution yet. In my case It was due to size of particular column. I skipped that column in export And it worked.Escalation_Dude
How do you skip columns? I also want to skip my first one as it is a checkbox columnmesosteros
you can use example at jsfiddle.net/onabai/xncmt There is inbuilt method available.Escalation_Dude
It worked but not as I intended. Thank you anyway.mesosteros

2 Answers

0
votes

I'm used such workaround (saveAs is the FileSaver.js)

if (window.JSZip && window.JSZip.support && window.JSZip.support.blob) {
    oldGenerate = window.JSZip.prototype.generate;
    oldJSZip = window.JSZip;
    window.JSZip.prototype.generate = function (options) {
        blobForSave = oldGenerate.call(JSZipInstance, _.extend(
            {},
            options,
            {
                type: 'blob',
                mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
            }
        ));
        return '';
    };
    window.JSZip = function () {
        JSZipInstance = new oldJSZip();
        return JSZipInstance;
    };
    workbook.toDataURL();
    window.JSZip = oldJSZip;
    window.JSZip.prototype.generate = oldGenerate;

    saveAs(blobForSave, fileName);
} else {
    kendo.saveAs({
        dataURI: workbook.toDataURL(),
        fileName: fileName
    });
}
0
votes

I have just resolved my problem with Kendo Export To PDF not working with Chrome. Using Network Traffic in Developer Tools I saw that there was a 404 error - DejaVuSans.ttf font not found. This did not stop Internet Explorer working - but it was the show stopper with Chrome. I moved the DejaVuSans font from the font folder to the Content folder (in with the calling css file), and changed the css code to (no path required now):

@font-face {
font-family: "DejaVu Sans";
src: url("DejaVuSans.ttf") format("truetype");
}

Perhaps not ideal to have a font in the Content folder when there is a font folder in the root directory, but my app works now.