Skip to content

Commit

Permalink
Merge pull request #164 from aliagamon/master
Browse files Browse the repository at this point in the history
Fixed download problem
  • Loading branch information
pphod authored Feb 2, 2019
2 parents 3521ebd + 63e9be1 commit 3ba0b17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dist/js/jquery.jexcel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4028,11 +4028,13 @@ var methods = {

// Download element
var pom = document.createElement('a');
var blob = new Blob([data], {type: 'text/csv;charset=utf-8;'});
var blob = new Blob(["\uFEFF"+data], {type: 'text/csv;charset=utf-8;'});
var url = URL.createObjectURL(blob);
pom.href = url;
pom.setAttribute('download', options.csvFileName + '.csv');
document.body.appendChild(pom);
pom.click();
document.body.removeChild(pom);
},

/**
Expand Down

0 comments on commit 3ba0b17

Please sign in to comment.