jquery-table2excel icon indicating copy to clipboard operation
jquery-table2excel copied to clipboard

Exporting large volume to excel (1200 rows) not creating .xsls file

Open tejas6jan opened this issue 9 years ago • 9 comments

Hi, I have tried to export table that contains more than 1000 rows. And found that the file is failed to download saying network error. However, it works totally fine in case of less number of records.

Attached is the image showing the error image

Please help.

Thanks

tejas6jan avatar Aug 02 '16 11:08 tejas6jan

I have encountered this question few days ago. Did you resolve it ? Please help. Thanks.

lanyudhy avatar Nov 09 '16 01:11 lanyudhy

Rather than converting the file to base64 convert to blob object . It will work.

sureshputtur avatar Nov 25 '16 10:11 sureshputtur

How to convert to blob object? Would you please public your code? Thanks,

Edward-Shaw avatar Dec 13 '16 10:12 Edward-Shaw

I want to emphasize again, that this entire approach is a hack. It's using a browser feature that's rarely used.

@sureshpoosapati Can you provide more info or a PR?

@Edward-Shaw The code is public. This issue is in the project. The actual code is at https://github.com/rainabba/jquery-table2excel/blob/master/src/jquery.table2excel.js

rainabba avatar Dec 13 '16 16:12 rainabba

var contentType = "application/vnd.ms-excel"; var byteCharacters = e.format(fullTemplate, e.ctx); var byteNumbers = new Array(byteCharacters.length); for (var i = 0; i < byteCharacters.length; i++) { byteNumbers[i] = byteCharacters.charCodeAt(i); } var byteArray = new Uint8Array(byteNumbers); var blob = new Blob([byteArray], {type: contentType}); var blobUrl = URL.createObjectURL(blob); //FILEDOWNLOADFIX END a = document.createElement("a"); a.download = getFileName(e.settings); a.href = blobUrl; document.body.appendChild(a); a.click(); document.body.removeChild(a);

sureshputtur avatar Dec 28 '16 06:12 sureshputtur

I'll look at testing/integrating tomorrow. @sureshpoosapati or @tejas6jan If you can link me to a table I can test this against, which has been a problem in the past, that would be helpful.

rainabba avatar Dec 29 '16 08:12 rainabba

I've tried in firefox and it can download the large excel table, but failed in chrome, is that something wrong?

David3310273 avatar Mar 16 '17 02:03 David3310273

Are you using latest jquery-table2excel plugin file. In latest there is a fix for large excel sheet. Check it once @David3310273

sureshputtur avatar Mar 17 '17 06:03 sureshputtur

How can i export the data into excel which is not in the table tag.please provide the solution.

how can i add div tags which are outside of the table tag into full template

bolla72892 avatar Dec 14 '18 09:12 bolla72892