Open tejas6jan opened 8 years ago
I have encountered this question few days ago. Did you resolve it ? Please help. Thanks.
Rather than converting the file to base64 convert to blob object . It will work.
How to convert to blob object? Would you please public your code? Thanks,
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
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);
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.
I've tried in firefox and it can download the large excel table, but failed in chrome, is that something wrong?
Are you using latest jquery-table2excel plugin file. In latest there is a fix for large excel sheet. Check it once @David3310273
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
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
Please help.
Thanks